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

[virt-tools-list] [PATCH 03/47] Add decl for all _get_type() methods & enable warnings



Eliminate compile warnings about undeclared XXX_get_type()
methods, by adding declarations for all objects.

Switch to using standard GNOME m4 magic for compile
warnings. Force enablement of automake maintainer
mode, so that Makefile is re-generated if Makefile.am
ever changes. Enable silent build rules so that compile
warnings can be more easily spotted.

* Makefile.am: Whitespace tweak
* configure.ac: Remove -Wall, -Werror. Add
  GNOME_COMPILE_WARNINGS, GNOME_MAINTAINER_MODE_DEFINES,
  AM_MAINTAINER_MODE, AM_SILENT_RULES
* osinfo/*.h: Add XXX_get_type() declarations for all
  objects
* osinfo/Makefile.am: Add $(WARN_CFLAGS) to build
---
 Makefile.am                    |    3 ++-
 configure.ac                   |    9 ++++++++-
 osinfo/Makefile.am             |    1 +
 osinfo/osinfo_db.h             |    2 ++
 osinfo/osinfo_device.h         |    2 ++
 osinfo/osinfo_devicelist.h     |    2 ++
 osinfo/osinfo_entity.h         |    2 ++
 osinfo/osinfo_filter.h         |    2 ++
 osinfo/osinfo_hypervisor.h     |    2 ++
 osinfo/osinfo_hypervisorlist.h |    2 ++
 osinfo/osinfo_list.h           |    2 ++
 osinfo/osinfo_os.h             |    2 ++
 osinfo/osinfo_oslist.h         |    2 ++
 13 files changed, 31 insertions(+), 2 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 1a271c6..8a8548e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,7 +1,8 @@
 
 SUBDIRS = osinfo test
 
-EXTRA_DIST =				\
+EXTRA_DIST = \
   data/libosinfo-dummy-data.xml
 
 
+ACLOCAL_AMFLAGS = -I m4
diff --git a/configure.ac b/configure.ac
index 3db8bde..6fa0986 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,13 +1,20 @@
 AC_INIT([libosinfo], [0.2], [virt-tools-list redhat com])
 AC_CONFIG_AUX_DIR([build-aux])
 AC_CONFIG_MACRO_DIR([m4])
-AM_INIT_AUTOMAKE([1.11.1 -Wall -Werror foreign color-tests])
+AM_INIT_AUTOMAKE([1.11.1 foreign color-tests])
 AC_PREREQ([2.61])
 AC_CONFIG_SRCDIR([osinfo/osinfo_common.c])
 AC_CONFIG_HEADERS([config.h])
 AC_PROG_LIBTOOL
 AC_PROG_CC
 
+GNOME_COMPILE_WARNINGS([maximum])
+GNOME_MAINTAINER_MODE_DEFINES
+AM_MAINTAINER_MODE([enable])
+
+# Use the silent-rules feature when possible.
+m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
+
 LIBXML_REQUIRED=2.6.0
 
 #PKG_CHECK_MODULES([GLIB], [glib-2.0], [GLIB_FOUND=yes], [GLIB_FOUND=no])
diff --git a/osinfo/Makefile.am b/osinfo/Makefile.am
index a44349a..23e2ab5 100644
--- a/osinfo/Makefile.am
+++ b/osinfo/Makefile.am
@@ -1,5 +1,6 @@
 
 AM_CPPFLAGS = \
+	$(WARN_CFLAGS) \
 	-I$(top_srcdir) \
 	$(LIBXML_CFLAGS) \
 	$(GOBJECT_CFLAGS)
diff --git a/osinfo/osinfo_db.h b/osinfo/osinfo_db.h
index 305ed29..b26f5a5 100644
--- a/osinfo/osinfo_db.h
+++ b/osinfo/osinfo_db.h
@@ -62,6 +62,8 @@ struct _OsinfoDbClass
     /* class members */
 };
 
+GType osinfo_db_get_type(void);
+
 int osinfoInitializeDb(OsinfoDb *self, GError **err);
 
 OsinfoHypervisor *osinfoGetHypervisorById(OsinfoDb *self, gchar *hvId, GError **err);
diff --git a/osinfo/osinfo_device.h b/osinfo/osinfo_device.h
index 9f10e6b..41d89ca 100644
--- a/osinfo/osinfo_device.h
+++ b/osinfo/osinfo_device.h
@@ -44,6 +44,8 @@ struct _OsinfoDeviceClass
     /* class members */
 };
 
+GType osinfo_device_get_type(void);
+
 gchar *osinfoGetDeviceDriver(OsinfoDevice *self, gchar *devType, OsinfoOs *os, OsinfoHypervisor *hv, GError **err);
 
 #endif /* __OSINFO_DEVICE_H__ */
diff --git a/osinfo/osinfo_devicelist.h b/osinfo/osinfo_devicelist.h
index 49e2715..a62bbe8 100644
--- a/osinfo/osinfo_devicelist.h
+++ b/osinfo/osinfo_devicelist.h
@@ -42,6 +42,8 @@ struct _OsinfoDeviceListClass
     /* class members */
 };
 
+GType osinfo_devicelist_get_type(void);
+
 OsinfoDeviceList *osinfoDeviceListFilter(OsinfoDeviceList *self, OsinfoFilter *filter, GError **err);
 OsinfoDevice *osinfoGetDeviceAtIndex(OsinfoDeviceList *self, gint idx, GError **err);
 OsinfoDeviceList *osinfoDeviceListIntersect(OsinfoDeviceList *self, OsinfoDeviceList *otherDeviceList, GError **err);
diff --git a/osinfo/osinfo_entity.h b/osinfo/osinfo_entity.h
index 0c8047c..e4ffa06 100644
--- a/osinfo/osinfo_entity.h
+++ b/osinfo/osinfo_entity.h
@@ -43,6 +43,8 @@ struct _OsinfoEntityClass
     /* class members */
 };
 
+GType osinfo_entity_get_type(void);
+
 gchar *osinfoGetId(OsinfoEntity *self, GError **err);
 GPtrArray *osinfoGetParams(OsinfoEntity *self, GError **err);
 gchar *osinfoGetParamValue(OsinfoEntity *self, gchar *key, GError **err);
diff --git a/osinfo/osinfo_filter.h b/osinfo/osinfo_filter.h
index 9a60fcd..e1e4ce8 100644
--- a/osinfo/osinfo_filter.h
+++ b/osinfo/osinfo_filter.h
@@ -46,6 +46,8 @@ struct _OsinfoFilterClass
     /* class members */
 };
 
+GType osinfo_filter_get_type(void);
+
 void osinfoFreeFilter(OsinfoFilter *self);
 
 gint osinfoAddFilterContstraint(OsinfoFilter *self, gchar *propName, gchar *propVal, GError **err);
diff --git a/osinfo/osinfo_hypervisor.h b/osinfo/osinfo_hypervisor.h
index 65c78dc..3ec4f8b 100644
--- a/osinfo/osinfo_hypervisor.h
+++ b/osinfo/osinfo_hypervisor.h
@@ -46,6 +46,8 @@ struct _OsinfoHypervisorClass
     /* class members */
 };
 
+GType osinfo_hypervisor_get_type(void);
+
 GPtrArray *osinfoGetHypervisorDeviceTypes(OsinfoHypervisor *self, GError **err);
 OsinfoDeviceList *osinfoGetHypervisorDevicesByType(OsinfoHypervisor *self, gchar *devType, OsinfoFilter *filter, GError **err);
 
diff --git a/osinfo/osinfo_hypervisorlist.h b/osinfo/osinfo_hypervisorlist.h
index bdc7f03..eaf0a7c 100644
--- a/osinfo/osinfo_hypervisorlist.h
+++ b/osinfo/osinfo_hypervisorlist.h
@@ -42,6 +42,8 @@ struct _OsinfoHypervisorListClass
     /* class members */
 };
 
+GType osinfo_hypervisorlist_get_type(void);
+
 OsinfoHypervisorList *osinfoHypervisorListFilter(OsinfoHypervisorList *self, OsinfoFilter *filter, GError **err);
 OsinfoHypervisor *osinfoGetHypervisorAtIndex(OsinfoHypervisorList *self, gint idx, GError **err);
 OsinfoHypervisorList *osinfoHypervisorListIntersect(OsinfoHypervisorList *self, OsinfoHypervisorList *otherHypervisorList, GError **err);
diff --git a/osinfo/osinfo_list.h b/osinfo/osinfo_list.h
index 81a2bc7..324345b 100644
--- a/osinfo/osinfo_list.h
+++ b/osinfo/osinfo_list.h
@@ -40,6 +40,8 @@ struct _OsinfoListClass
     /* class members */
 };
 
+GType osinfo_list_get_type(void);
+
 void osinfoFreeList(OsinfoList *self);
 gint osinfoListLength(OsinfoList *self);
 
diff --git a/osinfo/osinfo_os.h b/osinfo/osinfo_os.h
index 83241c9..b4c6497 100644
--- a/osinfo/osinfo_os.h
+++ b/osinfo/osinfo_os.h
@@ -48,6 +48,8 @@ struct _OsinfoOsClass
     /* class members */
 };
 
+GType osinfo_os_get_type(void);
+
 OsinfoDevice *osinfoGetPreferredDeviceForOs(OsinfoOs *self, OsinfoHypervisor *hv, gchar *devType, OsinfoFilter *filter, GError **err);
 OsinfoOsList *osinfoGetRelatedOs(OsinfoOs *self, osinfoRelationship relshp, GError **err);
 OsinfoDeviceList *osinfoGetDevicesForOs(OsinfoOs *self, OsinfoHypervisor *hv, gchar *devType, OsinfoFilter *filter, GError **err);
diff --git a/osinfo/osinfo_oslist.h b/osinfo/osinfo_oslist.h
index 168f5a5..2b51351 100644
--- a/osinfo/osinfo_oslist.h
+++ b/osinfo/osinfo_oslist.h
@@ -43,6 +43,8 @@ struct _OsinfoOsListClass
     /* class members */
 };
 
+GType osinfo_oslist_get_type(void);
+
 OsinfoOsList *osinfoOsListFilter(OsinfoOsList *self, OsinfoFilter *filter, GError **err);
 OsinfoOs *osinfoGetOsAtIndex(OsinfoOsList *self, gint idx, GError **err);
 OsinfoOsList *osinfoOsListIntersect(OsinfoOsList *self, OsinfoOsList *otherOsList, GError **err);
-- 
1.7.2.1


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