qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [COMMIT aa43d9c] Shuffle lines to avoid gcc 3 warning abo


From: Anthony Liguori
Subject: [Qemu-commits] [COMMIT aa43d9c] Shuffle lines to avoid gcc 3 warning about redundantredeclaration
Date: Fri, 04 Sep 2009 18:49:33 -0000

From: Blue Swirl <address@hidden>

Signed-off-by: Blue Swirl <address@hidden>

diff --git a/qdict.c b/qdict.c
index cffd23d..ecc266e 100644
--- a/qdict.c
+++ b/qdict.c
@@ -17,7 +17,12 @@
 #include "sys-queue.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
@@ -290,8 +295,3 @@ static void qdict_destroy_obj(QObject *obj)
 
     qemu_free(qdict);
 }
-
-static const QType qdict_type = {
-    .code = QTYPE_QDICT,
-    .destroy = qdict_destroy_obj,
-};
diff --git a/qint.c b/qint.c
index 9a56906..447e847 100644
--- a/qint.c
+++ b/qint.c
@@ -13,7 +13,12 @@
 #include "qobject.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
@@ -59,8 +64,3 @@ static void qint_destroy_obj(QObject *obj)
     assert(obj != NULL);
     qemu_free(qobject_to_qint(obj));
 }
-
-static const QType qint_type = {
-    .code = QTYPE_QINT,
-    .destroy = qint_destroy_obj,
-};
diff --git a/qstring.c b/qstring.c
index 9fa2e30..6d411da 100644
--- a/qstring.c
+++ b/qstring.c
@@ -13,7 +13,12 @@
 #include "qstring.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
@@ -66,8 +71,3 @@ static void qstring_destroy_obj(QObject *obj)
     qemu_free(qs->string);
     qemu_free(qs);
 }
-
-static const QType qstring_type = {
-    .code = QTYPE_QSTRING,
-    .destroy = qstring_destroy_obj,
-};




reply via email to

[Prev in Thread] Current Thread [Next in Thread]