소스 검색

Shuffle lines to avoid gcc 3 warning about redundant redeclaration

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Blue Swirl 16 년 전
부모
커밋
aa43d9ccab
3개의 변경된 파일18개의 추가작업 그리고 18개의 파일을 삭제
  1. 6 6
      qdict.c
  2. 6 6
      qint.c
  3. 6 6
      qstring.c

+ 6 - 6
qdict.c

@@ -17,7 +17,12 @@
 #include "sys-queue.h"
 #include "sys-queue.h"
 #include "qemu-common.h"
 #include "qemu-common.h"
 
 
-static const QType qdict_type;
+static void qdict_destroy_obj(QObject *obj);
+
+static const QType qdict_type = {
+    .code = QTYPE_QDICT,
+    .destroy = qdict_destroy_obj,
+};
 
 
 /**
 /**
  * qdict_new(): Create a new QDict
  * qdict_new(): Create a new QDict
@@ -290,8 +295,3 @@ static void qdict_destroy_obj(QObject *obj)
 
 
     qemu_free(qdict);
     qemu_free(qdict);
 }
 }
-
-static const QType qdict_type = {
-    .code = QTYPE_QDICT,
-    .destroy = qdict_destroy_obj,
-};

+ 6 - 6
qint.c

@@ -13,7 +13,12 @@
 #include "qobject.h"
 #include "qobject.h"
 #include "qemu-common.h"
 #include "qemu-common.h"
 
 
-static const QType qint_type;
+static void qint_destroy_obj(QObject *obj);
+
+static const QType qint_type = {
+    .code = QTYPE_QINT,
+    .destroy = qint_destroy_obj,
+};
 
 
 /**
 /**
  * qint_from_int(): Create a new QInt from an int64_t
  * qint_from_int(): Create a new QInt from an int64_t
@@ -59,8 +64,3 @@ static void qint_destroy_obj(QObject *obj)
     assert(obj != NULL);
     assert(obj != NULL);
     qemu_free(qobject_to_qint(obj));
     qemu_free(qobject_to_qint(obj));
 }
 }
-
-static const QType qint_type = {
-    .code = QTYPE_QINT,
-    .destroy = qint_destroy_obj,
-};

+ 6 - 6
qstring.c

@@ -13,7 +13,12 @@
 #include "qstring.h"
 #include "qstring.h"
 #include "qemu-common.h"
 #include "qemu-common.h"
 
 
-static const QType qstring_type;
+static void qstring_destroy_obj(QObject *obj);
+
+static const QType qstring_type = {
+    .code = QTYPE_QSTRING,
+    .destroy = qstring_destroy_obj,
+};
 
 
 /**
 /**
  * qstring_from_str(): Create a new QString from a regular C string
  * qstring_from_str(): Create a new QString from a regular C string
@@ -66,8 +71,3 @@ static void qstring_destroy_obj(QObject *obj)
     qemu_free(qs->string);
     qemu_free(qs->string);
     qemu_free(qs);
     qemu_free(qs);
 }
 }
-
-static const QType qstring_type = {
-    .code = QTYPE_QSTRING,
-    .destroy = qstring_destroy_obj,
-};