glom r2030 - in trunk: . glom glom/bakery glom/layout_item_dialogs glom/libglom glom/libglom/connectionpool_backends glom/libglom/data_structure glom/libglom/data_structure/layout glom/libglom/data_structure/layout/report_parts glom/libglom/document glom/libglom/document/bakery glom/libglom/document/bakery/view glom/libglom/python_embed glom/mode_data glom/mode_design glom/mode_design/fields glom/mode_design/print_layouts glom/mode_design/script_library glom/mode_design/users glom/mode_find glom/navigation glom/python_embed glom/python_embed/python_module glom/relationships_overview glom/reports glom/translation glom/utility_widgets glom/utility_widgets/adddel glom/utility_widgets/adddel/eggcolumnchooser glom/utility_widgets/canvas glom/utility_widgets/cellrendererlist glom/utility_widgets/db_adddel macros regression_tests



Author: murrayc
Date: Thu Mar 26 11:16:25 2009
New Revision: 2030
URL: http://svn.gnome.org/viewvc/glom?rev=2030&view=rev

Log:
2009-03-26  Murray Cumming  <murrayc murrayc com>

* configure.ac:
* macros/macros.m4: Removed this.
* macros/dk-warn.m4: Added this, which is the updated version.
* glom/*/*.am
* glom/*/*.cc: Fixed some warnings.

Removed:
   trunk/macros/macros.m4
Modified:
   trunk/ChangeLog
   trunk/configure.ac
   trunk/glom/Makefile.am
   trunk/glom/bakery/Makefile.am
   trunk/glom/layout_item_dialogs/Makefile.am
   trunk/glom/libglom/Makefile.am
   trunk/glom/libglom/connectionpool.cc
   trunk/glom/libglom/connectionpool_backends/Makefile.am
   trunk/glom/libglom/data_structure/Makefile.am
   trunk/glom/libglom/data_structure/glomconversions.cc
   trunk/glom/libglom/data_structure/layout/Makefile.am
   trunk/glom/libglom/data_structure/layout/report_parts/Makefile.am
   trunk/glom/libglom/data_structure/print_layout.cc
   trunk/glom/libglom/document/Makefile.am
   trunk/glom/libglom/document/bakery/Makefile.am
   trunk/glom/libglom/document/bakery/view/Makefile.am
   trunk/glom/libglom/python_embed/Makefile.am
   trunk/glom/libglom/python_embed/pygdavalue_conversions.c
   trunk/glom/mode_data/Makefile.am
   trunk/glom/mode_design/Makefile.am
   trunk/glom/mode_design/fields/Makefile.am
   trunk/glom/mode_design/print_layouts/Makefile.am
   trunk/glom/mode_design/print_layouts/canvas_print_layout.cc
   trunk/glom/mode_design/print_layouts/window_print_layout_edit.cc
   trunk/glom/mode_design/script_library/Makefile.am
   trunk/glom/mode_design/users/Makefile.am
   trunk/glom/mode_find/Makefile.am
   trunk/glom/navigation/Makefile.am
   trunk/glom/python_embed/Makefile.am
   trunk/glom/python_embed/python_module/Makefile.am
   trunk/glom/relationships_overview/Makefile.am
   trunk/glom/reports/Makefile.am
   trunk/glom/translation/Makefile.am
   trunk/glom/utility_widgets/Makefile.am
   trunk/glom/utility_widgets/adddel/Makefile.am
   trunk/glom/utility_widgets/adddel/eggcolumnchooser/Makefile.am
   trunk/glom/utility_widgets/adddel/eggcolumnchooser/eggcolumnchooserdialog.c
   trunk/glom/utility_widgets/canvas/Makefile.am
   trunk/glom/utility_widgets/canvas/canvas_group_grid.cc
   trunk/glom/utility_widgets/cellrendererlist/Makefile.am
   trunk/glom/utility_widgets/db_adddel/Makefile.am
   trunk/macros/Makefile.am
   trunk/macros/dk-warn.m4
   trunk/regression_tests/Makefile.am

Modified: trunk/configure.ac
==============================================================================
--- trunk/configure.ac	(original)
+++ trunk/configure.ac	Thu Mar 26 11:16:25 2009
@@ -155,7 +155,10 @@
 AC_DEFINE_UNQUOTED(GLOM_DTD_INSTALL_DIR, $GLOM_DTD_INSTALL_DIR, "definition of GLOM_DTD_INSTALL_DIR")
 
 # Evaluate the --enable-warnings=level option.
-GLOM_ARG_ENABLE_WARNINGS()
+DK_ARG_ENABLE_WARNINGS([GLOM_WARNING_FLAGS],
+                       [-Wall -w1],
+                       [-Wall -Wextra -w1],
+                       [GLIBMM GTKMM])
 
 AC_ARG_ENABLE(update-mime-database,
         AS_HELP_STRING([--disable-update-mime-database],[do not run the update-mime-database utility (mostly useful for package maintainers) ]))

Modified: trunk/glom/Makefile.am
==============================================================================
--- trunk/glom/Makefile.am	(original)
+++ trunk/glom/Makefile.am	Thu Mar 26 11:16:25 2009
@@ -15,7 +15,7 @@
 
 # We define GLOM_GLADEDIR so that we can get the installed .glade file at runtime.
 # We define PREFIX, SYSCONFDIR, LIBDIR, and DATADIR for the GNOME_PROGRAM_STANDARD_PROPERTIES macro.
-AM_CPPFLAGS = -I top_srcdir@/ -I top_srcdir@/glom $(GLOM_CFLAGS) $(PYTHON_INCLUDES) \
+AM_CPPFLAGS = -I top_srcdir@/ -I top_srcdir@/glom $(GLOM_CFLAGS) $(GLOM_WARNING_FLAGS) $(PYTHON_INCLUDES) \
 			$(MAEMO_LAUNCHER_CFLAGS) \
            -DGLOM_GLADEDIR=\""$(gladedir)/"\" \
            -DLOCALEDIR=\""$(datadir)/locale"\" \

Modified: trunk/glom/bakery/Makefile.am
==============================================================================
--- trunk/glom/bakery/Makefile.am	(original)
+++ trunk/glom/bakery/Makefile.am	Thu Mar 26 11:16:25 2009
@@ -1,4 +1,4 @@
-AM_CPPFLAGS = -I top_srcdir@/ -I top_srcdir@/glom $(GLOM_CFLAGS)
+AM_CPPFLAGS = -I top_srcdir@/ -I top_srcdir@/glom $(GLOM_CFLAGS) $(GLOM_WARNING_FLAGS)
 
 h_sources = app_withdoc.h app.h app_withdoc_gtk.h dialog_offersave.h
 cc_sources = app_withdoc.cc app.cc app_withdoc_gtk.cc dialog_offersave.cc

Modified: trunk/glom/layout_item_dialogs/Makefile.am
==============================================================================
--- trunk/glom/layout_item_dialogs/Makefile.am	(original)
+++ trunk/glom/layout_item_dialogs/Makefile.am	Thu Mar 26 11:16:25 2009
@@ -2,7 +2,7 @@
 glomxsltdir = $(datadir)/glom/xslt/
 
 # We define GLOM_GLADEDIR so that we can get the installed .glade file at runtime.
-AM_CPPFLAGS = -I top_srcdir@/ -I top_srcdir@/glom $(GLOM_CFLAGS) $(PYTHON_INCLUDES) \
+AM_CPPFLAGS = -I top_srcdir@/ -I top_srcdir@/glom $(GLOM_CFLAGS) $(GLOM_WARNING_FLAGS) $(PYTHON_INCLUDES) \
                     -DGLOM_GLADEDIR=\""$(gladedir)/"\" \
                     -DGLOM_XSLTDIR=\""$(glomxsltdir)/"\"
 

Modified: trunk/glom/libglom/Makefile.am
==============================================================================
--- trunk/glom/libglom/Makefile.am	(original)
+++ trunk/glom/libglom/Makefile.am	Thu Mar 26 11:16:25 2009
@@ -7,7 +7,7 @@
 
 # We define GLOM_GLADEDIR so that we can get the installed .glade file at runtime.
 # We define PREFIX, SYSCONFDIR, LIBDIR, and DATADIR for the GNOME_PROGRAM_STANDARD_PROPERTIES macro.
-AM_CPPFLAGS = -I top_srcdir@/ -I top_srcdir@/glom $(GLOM_CFLAGS) $(PYTHON_INCLUDES) \
+AM_CPPFLAGS = -I top_srcdir@/ -I top_srcdir@/glom $(GLOM_CFLAGS) $(GLOM_WARNING_FLAGS) $(PYTHON_INCLUDES) \
            -DGLOM_GLADEDIR=\""$(gladedir)/"\" \
            -DLOCALEDIR=\""$(datadir)/locale"\" \
            -DPREFIX=\""$(prefix)"\" \

Modified: trunk/glom/libglom/connectionpool.cc
==============================================================================
--- trunk/glom/libglom/connectionpool.cc	(original)
+++ trunk/glom/libglom/connectionpool.cc	Thu Mar 26 11:16:25 2009
@@ -200,7 +200,7 @@
 void SharedConnection::close()
 {
   if(m_gda_connection)
-    m_gda_connection.clear();
+    m_gda_connection.reset();
 
 
   //Tell the connection pool that we have finished with this connection.
@@ -511,7 +511,7 @@
     //g_warning("ConnectionPool::on_sharedconnection_finished(): closing GdaConnection");
     m_refGdaConnection->close();
 
-    m_refGdaConnection.clear();
+    m_refGdaConnection.reset();
 
 #ifndef GLOM_ENABLE_CLIENT_ONLY
 #ifndef G_OS_WIN32

Modified: trunk/glom/libglom/connectionpool_backends/Makefile.am
==============================================================================
--- trunk/glom/libglom/connectionpool_backends/Makefile.am	(original)
+++ trunk/glom/libglom/connectionpool_backends/Makefile.am	Thu Mar 26 11:16:25 2009
@@ -1,5 +1,5 @@
 AM_CPPFLAGS = \
-	-I top_srcdir@/ -I top_srcdir@/glom $(GLOM_CFLAGS) \
+	-I top_srcdir@/ -I top_srcdir@/glom $(GLOM_CFLAGS) $(GLOM_WARNING_FLAGS) \
 	-DEXEEXT=\""$(EXEEXT)"\"
 
 noinst_LTLIBRARIES = libconnectionpool_backends.la

Modified: trunk/glom/libglom/data_structure/Makefile.am
==============================================================================
--- trunk/glom/libglom/data_structure/Makefile.am	(original)
+++ trunk/glom/libglom/data_structure/Makefile.am	Thu Mar 26 11:16:25 2009
@@ -1,6 +1,6 @@
 SUBDIRS = layout
 
-AM_CPPFLAGS = -I top_srcdir@/ -I top_srcdir@/glom $(GLOM_CFLAGS)
+AM_CPPFLAGS = -I top_srcdir@/ -I top_srcdir@/glom $(GLOM_CFLAGS) $(GLOM_WARNING_FLAGS)
 
 h_sources = field.h \
                               foundset.h \

Modified: trunk/glom/libglom/data_structure/glomconversions.cc
==============================================================================
--- trunk/glom/libglom/data_structure/glomconversions.cc	(original)
+++ trunk/glom/libglom/data_structure/glomconversions.cc	Thu Mar 26 11:16:25 2009
@@ -1024,7 +1024,7 @@
       }
       catch(const Gdk::PixbufError& ex)
       {
-        refPixbufLoader.clear();
+        refPixbufLoader.reset();
         std::cerr << "PixbufLoader::create failed: " << ex.what() << std::endl;
       }
 

Modified: trunk/glom/libglom/data_structure/layout/Makefile.am
==============================================================================
--- trunk/glom/libglom/data_structure/layout/Makefile.am	(original)
+++ trunk/glom/libglom/data_structure/layout/Makefile.am	Thu Mar 26 11:16:25 2009
@@ -1,6 +1,6 @@
 SUBDIRS = report_parts
 
-AM_CPPFLAGS = -I top_srcdir@/ -I top_srcdir@/glom $(GLOM_CFLAGS)
+AM_CPPFLAGS = -I top_srcdir@/ -I top_srcdir@/glom $(GLOM_CFLAGS) $(GLOM_WARNING_FLAGS)
 
 noinst_LTLIBRARIES = libdata_structure_layout.la
 

Modified: trunk/glom/libglom/data_structure/layout/report_parts/Makefile.am
==============================================================================
--- trunk/glom/libglom/data_structure/layout/report_parts/Makefile.am	(original)
+++ trunk/glom/libglom/data_structure/layout/report_parts/Makefile.am	Thu Mar 26 11:16:25 2009
@@ -1,4 +1,4 @@
-AM_CPPFLAGS = -I top_srcdir@/ -I top_srcdir@/glom $(GLOM_CFLAGS)
+AM_CPPFLAGS = -I top_srcdir@/ -I top_srcdir@/glom $(GLOM_CFLAGS) $(GLOM_WARNING_FLAGS)
 
 noinst_LTLIBRARIES = libdata_structure_layout_reportparts.la
 

Modified: trunk/glom/libglom/data_structure/print_layout.cc
==============================================================================
--- trunk/glom/libglom/data_structure/print_layout.cc	(original)
+++ trunk/glom/libglom/data_structure/print_layout.cc	Thu Mar 26 11:16:25 2009
@@ -47,7 +47,7 @@
   m_layout_group = src.m_layout_group;
   m_show_table_title = src.m_show_table_title;
 
-  m_page_setup.clear();
+  m_page_setup.reset();
   if(src.m_page_setup)
     m_page_setup = src.m_page_setup->copy();
 

Modified: trunk/glom/libglom/document/Makefile.am
==============================================================================
--- trunk/glom/libglom/document/Makefile.am	(original)
+++ trunk/glom/libglom/document/Makefile.am	Thu Mar 26 11:16:25 2009
@@ -1,6 +1,6 @@
 SUBDIRS = bakery
 
-AM_CPPFLAGS = -I top_srcdir@/ -I top_srcdir@/glom $(GLOM_CFLAGS)
+AM_CPPFLAGS = -I top_srcdir@/ -I top_srcdir@/glom $(GLOM_CFLAGS) $(GLOM_WARNING_FLAGS)
 
 h_sources = document_glom.h view.h
 cc_sources = document_glom.cc

Modified: trunk/glom/libglom/document/bakery/Makefile.am
==============================================================================
--- trunk/glom/libglom/document/bakery/Makefile.am	(original)
+++ trunk/glom/libglom/document/bakery/Makefile.am	Thu Mar 26 11:16:25 2009
@@ -1,6 +1,6 @@
 SUBDIRS = view
 
-AM_CPPFLAGS = -I top_srcdir@/ -I top_srcdir@/glom $(GLOM_CFLAGS)
+AM_CPPFLAGS = -I top_srcdir@/ -I top_srcdir@/glom $(GLOM_CFLAGS) $(GLOM_WARNING_FLAGS)
 
 h_sources = document.h document_xml.h
 cc_sources = document.cc document_xml.cc

Modified: trunk/glom/libglom/document/bakery/view/Makefile.am
==============================================================================
--- trunk/glom/libglom/document/bakery/view/Makefile.am	(original)
+++ trunk/glom/libglom/document/bakery/view/Makefile.am	Thu Mar 26 11:16:25 2009
@@ -4,7 +4,7 @@
 
 # We define GLOM_GLADEDIR so that we can get the installed .glade file at runtime.
 # We define PREFIX, SYSCONFDIR, LIBDIR, and DATADIR for the GNOME_PROGRAM_STANDARD_PROPERTIES macro.
-AM_CPPFLAGS = -I top_srcdir@/ -I top_srcdir@/glom $(GLOM_CFLAGS) $(PYTHON_INCLUDES) \
+AM_CPPFLAGS = -I top_srcdir@/ -I top_srcdir@/glom $(GLOM_CFLAGS) $(GLOM_WARNING_FLAGS) $(PYTHON_INCLUDES) \
            -DGLOM_GLADEDIR=\""$(gladedir)/"\"
 
 

Modified: trunk/glom/libglom/python_embed/Makefile.am
==============================================================================
--- trunk/glom/libglom/python_embed/Makefile.am	(original)
+++ trunk/glom/libglom/python_embed/Makefile.am	Thu Mar 26 11:16:25 2009
@@ -1,6 +1,6 @@
 SUBDIRS =
 
-AM_CPPFLAGS = -I top_srcdir@/ -I top_srcdir@/glom  $(GLOM_CFLAGS) $(PYTHON_INCLUDES)
+AM_CPPFLAGS = -I top_srcdir@/ -I top_srcdir@/glom  $(GLOM_CFLAGS) $(GLOM_WARNING_FLAGS) $(PYTHON_INCLUDES)
 
 noinst_LTLIBRARIES = libglom_python_embed.la
 libglom_python_embed_la_SOURCES = py_glom_record.h py_glom_record.cc \

Modified: trunk/glom/libglom/python_embed/pygdavalue_conversions.c
==============================================================================
--- trunk/glom/libglom/python_embed/pygdavalue_conversions.c	(original)
+++ trunk/glom/libglom/python_embed/pygdavalue_conversions.c	Thu Mar 26 11:16:25 2009
@@ -90,6 +90,8 @@
 PyObject *
 pygda_value_as_pyobject(const GValue *boxed, gboolean copy_boxed)
 {
+    copy_boxed = FALSE; //Just to avoid the "unused paramter" and "parameter name omitted" warnings.
+
     GType value_type = GDA_TYPE_NULL;
     PyObject* ret = 0;
 

Modified: trunk/glom/mode_data/Makefile.am
==============================================================================
--- trunk/glom/mode_data/Makefile.am	(original)
+++ trunk/glom/mode_data/Makefile.am	Thu Mar 26 11:16:25 2009
@@ -2,7 +2,7 @@
 glomxsltdir = $(datadir)/glom/xslt/
 
 # We define GLOM_GLADEDIR so that we can get the installed .glade file at runtime.
-AM_CPPFLAGS = -I top_srcdir@/ -I top_srcdir@/glom $(GLOM_CFLAGS) $(PYTHON_INCLUDES) \
+AM_CPPFLAGS = -I top_srcdir@/ -I top_srcdir@/glom $(GLOM_CFLAGS) $(GLOM_WARNING_FLAGS) $(PYTHON_INCLUDES) \
                     -DGLOM_GLADEDIR=\""$(gladedir)/"\" \
                     -DGLOM_XSLTDIR=\""$(glomxsltdir)/"\"
 

Modified: trunk/glom/mode_design/Makefile.am
==============================================================================
--- trunk/glom/mode_design/Makefile.am	(original)
+++ trunk/glom/mode_design/Makefile.am	Thu Mar 26 11:16:25 2009
@@ -4,7 +4,7 @@
 
 # We define GLOM_GLADEDIR so that we can get the installed .glade file at runtime.
 # We define PREFIX, SYSCONFDIR, LIBDIR, and DATADIR for the GNOME_PROGRAM_STANDARD_PROPERTIES macro.
-AM_CPPFLAGS = -I top_srcdir@/ -I top_srcdir@/glom $(GLOM_CFLAGS) $(PYTHON_INCLUDES) \
+AM_CPPFLAGS = -I top_srcdir@/ -I top_srcdir@/glom $(GLOM_CFLAGS) $(GLOM_WARNING_FLAGS) $(PYTHON_INCLUDES) \
            -DGLOM_GLADEDIR=\""$(gladedir)/"\"
 
 noinst_LIBRARIES = libmode_design.a

Modified: trunk/glom/mode_design/fields/Makefile.am
==============================================================================
--- trunk/glom/mode_design/fields/Makefile.am	(original)
+++ trunk/glom/mode_design/fields/Makefile.am	Thu Mar 26 11:16:25 2009
@@ -1,7 +1,7 @@
 gladedir = $(datadir)/glom/glade/
 
 # We define GLOM_GLADEDIR so that we can get the installed .glade file at runtime.
-AM_CPPFLAGS = -I top_srcdir@/ -I top_srcdir@/glom $(GLOM_CFLAGS) $(PYTHON_INCLUDES) \
+AM_CPPFLAGS = -I top_srcdir@/ -I top_srcdir@/glom $(GLOM_CFLAGS) $(GLOM_WARNING_FLAGS) $(PYTHON_INCLUDES) \
                     -DGLOM_GLADEDIR=\""$(gladedir)/"\"
            
            

Modified: trunk/glom/mode_design/print_layouts/Makefile.am
==============================================================================
--- trunk/glom/mode_design/print_layouts/Makefile.am	(original)
+++ trunk/glom/mode_design/print_layouts/Makefile.am	Thu Mar 26 11:16:25 2009
@@ -5,7 +5,7 @@
 
 # We define GLOM_GLADEDIR so that we can get the installed .glade file at runtime.
 # We define PREFIX, SYSCONFDIR, LIBDIR, and DATADIR for the GNOME_PROGRAM_STANDARD_PROPERTIES macro.
-AM_CPPFLAGS = -I top_srcdir@/ -I top_srcdir@/glom $(GLOM_CFLAGS) $(PYTHON_INCLUDES) \
+AM_CPPFLAGS = -I top_srcdir@/ -I top_srcdir@/glom $(GLOM_CFLAGS) $(GLOM_WARNING_FLAGS) $(PYTHON_INCLUDES) \
            -DGLOM_GLADEDIR=\""$(gladedir)/"\" \
            -DGLOM_ICON_DIR=\""$(glom_icon_dir)"\"
 

Modified: trunk/glom/mode_design/print_layouts/canvas_print_layout.cc
==============================================================================
--- trunk/glom/mode_design/print_layouts/canvas_print_layout.cc	(original)
+++ trunk/glom/mode_design/print_layouts/canvas_print_layout.cc	Thu Mar 26 11:16:25 2009
@@ -368,7 +368,7 @@
 
   m_modified = true;
 
-  m_context_item.clear();
+  m_context_item.reset();
 }
 
 void Canvas_PrintLayout::on_context_menu_formatting()
@@ -424,7 +424,7 @@
 void Canvas_PrintLayout::on_context_menu_delete()
 {
   m_context_item->remove();
-  m_context_item.clear();
+  m_context_item.reset();
 }
 
 void Canvas_PrintLayout::on_dialog_format_hide()
@@ -494,7 +494,7 @@
   if(m_bounds_group)
   {
     m_bounds_group->remove();
-    m_bounds_group.clear();
+    m_bounds_group.reset();
   }
 
   Glib::RefPtr<Goocanvas::Item> root = get_root_item();

Modified: trunk/glom/mode_design/print_layouts/window_print_layout_edit.cc
==============================================================================
--- trunk/glom/mode_design/print_layouts/window_print_layout_edit.cc	(original)
+++ trunk/glom/mode_design/print_layouts/window_print_layout_edit.cc	Thu Mar 26 11:16:25 2009
@@ -462,7 +462,7 @@
     if(m_layout_item_dropping)
     {
       m_layout_item_dropping->remove();
-      m_layout_item_dropping.clear();
+      m_layout_item_dropping.reset();
     }
   }
 }
@@ -474,7 +474,7 @@
   if(m_layout_item_dropping)
   {
     m_layout_item_dropping->remove();
-    m_layout_item_dropping.clear();
+    m_layout_item_dropping.reset();
   }
 }
 

Modified: trunk/glom/mode_design/script_library/Makefile.am
==============================================================================
--- trunk/glom/mode_design/script_library/Makefile.am	(original)
+++ trunk/glom/mode_design/script_library/Makefile.am	Thu Mar 26 11:16:25 2009
@@ -4,7 +4,7 @@
 
 # We define GLOM_GLADEDIR so that we can get the installed .glade file at runtime.
 # We define PREFIX, SYSCONFDIR, LIBDIR, and DATADIR for the GNOME_PROGRAM_STANDARD_PROPERTIES macro.
-AM_CPPFLAGS = -I top_srcdir@/ -I top_srcdir@/glom $(GLOM_CFLAGS) $(PYTHON_INCLUDES) \
+AM_CPPFLAGS = -I top_srcdir@/ -I top_srcdir@/glom $(GLOM_CFLAGS) $(GLOM_WARNING_FLAGS) $(PYTHON_INCLUDES) \
            -DGLOM_GLADEDIR=\""$(gladedir)/"\"
 
 noinst_LIBRARIES = libmode_design_script_library.a

Modified: trunk/glom/mode_design/users/Makefile.am
==============================================================================
--- trunk/glom/mode_design/users/Makefile.am	(original)
+++ trunk/glom/mode_design/users/Makefile.am	Thu Mar 26 11:16:25 2009
@@ -4,7 +4,7 @@
 
 # We define GLOM_GLADEDIR so that we can get the installed .glade file at runtime.
 # We define PREFIX, SYSCONFDIR, LIBDIR, and DATADIR for the GNOME_PROGRAM_STANDARD_PROPERTIES macro.
-AM_CPPFLAGS = -I top_srcdir@/ -I top_srcdir@/glom $(GLOM_CFLAGS) $(PYTHON_INCLUDES) \
+AM_CPPFLAGS = -I top_srcdir@/ -I top_srcdir@/glom $(GLOM_CFLAGS) $(GLOM_WARNING_FLAGS) $(PYTHON_INCLUDES) \
            -DGLOM_GLADEDIR=\""$(gladedir)/"\"
 
 noinst_LIBRARIES = libmode_design_users.a

Modified: trunk/glom/mode_find/Makefile.am
==============================================================================
--- trunk/glom/mode_find/Makefile.am	(original)
+++ trunk/glom/mode_find/Makefile.am	Thu Mar 26 11:16:25 2009
@@ -1,4 +1,4 @@
-AM_CPPFLAGS = -I top_srcdir@/ -I top_srcdir@/glom $(GLOM_CFLAGS)
+AM_CPPFLAGS = -I top_srcdir@/ -I top_srcdir@/glom $(GLOM_CFLAGS) $(GLOM_WARNING_FLAGS)
 
 noinst_LIBRARIES = libmode_find.a
 libmode_find_a_SOURCES = box_data_details_find.cc box_data_details_find.h \

Modified: trunk/glom/navigation/Makefile.am
==============================================================================
--- trunk/glom/navigation/Makefile.am	(original)
+++ trunk/glom/navigation/Makefile.am	Thu Mar 26 11:16:25 2009
@@ -1,4 +1,4 @@
-AM_CPPFLAGS = -I top_srcdir@/ -I top_srcdir@/glom $(GLOM_CFLAGS)
+AM_CPPFLAGS = -I top_srcdir@/ -I top_srcdir@/glom $(GLOM_CFLAGS) $(GLOM_WARNING_FLAGS)
 
 noinst_LIBRARIES = libnavigation.a
 libnavigation_a_SOURCES = box_tables.cc box_tables.h

Modified: trunk/glom/python_embed/Makefile.am
==============================================================================
--- trunk/glom/python_embed/Makefile.am	(original)
+++ trunk/glom/python_embed/Makefile.am	Thu Mar 26 11:16:25 2009
@@ -1,4 +1,4 @@
-AM_CPPFLAGS = -I top_srcdir@/ -I top_srcdir@/glom $(GLOM_CFLAGS) $(PYTHON_INCLUDES)
+AM_CPPFLAGS = -I top_srcdir@/ -I top_srcdir@/glom $(GLOM_CFLAGS) $(GLOM_WARNING_FLAGS) $(PYTHON_INCLUDES)
 
 SUBDIRS = python_module
 

Modified: trunk/glom/python_embed/python_module/Makefile.am
==============================================================================
--- trunk/glom/python_embed/python_module/Makefile.am	(original)
+++ trunk/glom/python_embed/python_module/Makefile.am	Thu Mar 26 11:16:25 2009
@@ -1,4 +1,4 @@
-AM_CPPFLAGS = -I top_srcdir@/ -I top_srcdir@/glom $(GLOM_CFLAGS) $(PYTHON_INCLUDES)
+AM_CPPFLAGS = -I top_srcdir@/ -I top_srcdir@/glom $(GLOM_CFLAGS) $(GLOM_WARNING_FLAGS) $(PYTHON_INCLUDES)
 
 SUBDIRS =
 

Modified: trunk/glom/relationships_overview/Makefile.am
==============================================================================
--- trunk/glom/relationships_overview/Makefile.am	(original)
+++ trunk/glom/relationships_overview/Makefile.am	Thu Mar 26 11:16:25 2009
@@ -1,7 +1,7 @@
 gladedir = $(datadir)/glom/glade/
 
 # We define GLOM_GLADEDIR so that we can get the installed .glade file at runtime.
-AM_CPPFLAGS = -I top_srcdir@/ -I top_srcdir@/glom $(GLOM_CFLAGS) \
+AM_CPPFLAGS = -I top_srcdir@/ -I top_srcdir@/glom $(GLOM_CFLAGS) $(GLOM_WARNING_FLAGS) \
            -DGLOM_GLADEDIR=\""$(gladedir)/"\"
 
 noinst_LIBRARIES = librelationshipsoverview.a

Modified: trunk/glom/reports/Makefile.am
==============================================================================
--- trunk/glom/reports/Makefile.am	(original)
+++ trunk/glom/reports/Makefile.am	Thu Mar 26 11:16:25 2009
@@ -2,7 +2,7 @@
 glomxsltdir = $(datadir)/glom/xslt/
 
 # We define GLOM_GLADEDIR so that we can get the installed .glade file at runtime.
-AM_CPPFLAGS = -I top_srcdir@/  -I top_srcdir@/glom $(GLOM_CFLAGS) $(PYTHON_INCLUDES) \
+AM_CPPFLAGS = -I top_srcdir@/  -I top_srcdir@/glom $(GLOM_CFLAGS) $(GLOM_WARNING_FLAGS) $(PYTHON_INCLUDES) \
                     -DGLOM_GLADEDIR=\""$(gladedir)/"\" \
                     -DGLOM_XSLTDIR=\""$(glomxsltdir)/"\"
 

Modified: trunk/glom/translation/Makefile.am
==============================================================================
--- trunk/glom/translation/Makefile.am	(original)
+++ trunk/glom/translation/Makefile.am	Thu Mar 26 11:16:25 2009
@@ -2,7 +2,7 @@
 glomxsltdir = $(datadir)/glom/xslt/
 
 # We define GLOM_GLADEDIR so that we can get the installed .glade file at runtime.
-AM_CPPFLAGS = -I top_srcdir@/ -I top_srcdir@/glom $(GLOM_CFLAGS) $(PYTHON_INCLUDES) \
+AM_CPPFLAGS = -I top_srcdir@/ -I top_srcdir@/glom $(GLOM_CFLAGS) $(GLOM_WARNING_FLAGS) $(PYTHON_INCLUDES) \
                     -DGLOM_GLADEDIR=\""$(gladedir)/"\" \
                     -DGLOM_XSLTDIR=\""$(glomxsltdir)/"\"
 

Modified: trunk/glom/utility_widgets/Makefile.am
==============================================================================
--- trunk/glom/utility_widgets/Makefile.am	(original)
+++ trunk/glom/utility_widgets/Makefile.am	Thu Mar 26 11:16:25 2009
@@ -4,7 +4,7 @@
 glom_icon_dir = $(datadir)/glom/pixmaps
 
 # We define GLOM_GLADEDIR so that we can get the installed .glade file at runtime.
-AM_CPPFLAGS = -I top_srcdir@/ -I top_srcdir@/glom $(GLOM_CFLAGS) $(PYTHON_INCLUDES) \
+AM_CPPFLAGS = -I top_srcdir@/ -I top_srcdir@/glom $(GLOM_CFLAGS) $(GLOM_WARNING_FLAGS) $(PYTHON_INCLUDES) \
            -DGLOM_GLADEDIR=\""$(gladedir)/"\" \
            -DGLOM_ICON_DIR=\""$(glom_icon_dir)"\" \
            -DDATADIR=\""$(datadir)"\"

Modified: trunk/glom/utility_widgets/adddel/Makefile.am
==============================================================================
--- trunk/glom/utility_widgets/adddel/Makefile.am	(original)
+++ trunk/glom/utility_widgets/adddel/Makefile.am	Thu Mar 26 11:16:25 2009
@@ -1,6 +1,6 @@
 SUBDIRS = eggcolumnchooser
 
-AM_CPPFLAGS = -I top_srcdir@/ -I top_srcdir@/glom $(GLOM_CFLAGS)
+AM_CPPFLAGS = -I top_srcdir@/ -I top_srcdir@/glom $(GLOM_CFLAGS) $(GLOM_WARNING_FLAGS)
 
 noinst_LIBRARIES = libutility_widgets_adddel.a
 libutility_widgets_adddel_a_SOURCES = adddel.cc adddel.h adddel_withbuttons.cc adddel_withbuttons.h \

Modified: trunk/glom/utility_widgets/adddel/eggcolumnchooser/Makefile.am
==============================================================================
--- trunk/glom/utility_widgets/adddel/eggcolumnchooser/Makefile.am	(original)
+++ trunk/glom/utility_widgets/adddel/eggcolumnchooser/Makefile.am	Thu Mar 26 11:16:25 2009
@@ -1,4 +1,4 @@
-AM_CPPFLAGS = -I top_srcdir@/ $(GLOM_CFLAGS)
+AM_CPPFLAGS = -I top_srcdir@/ $(GLOM_CFLAGS) $(GLOM_WARNING_FLAGS)
 
 noinst_LIBRARIES = libutility_widgets_adddel_eggcolumnchooserdialog.a
 libutility_widgets_adddel_eggcolumnchooserdialog_a_SOURCES = eggcolumnchooserdialog.h eggcolumnchooserdialog.c \

Modified: trunk/glom/utility_widgets/adddel/eggcolumnchooser/eggcolumnchooserdialog.c
==============================================================================
--- trunk/glom/utility_widgets/adddel/eggcolumnchooser/eggcolumnchooserdialog.c	(original)
+++ trunk/glom/utility_widgets/adddel/eggcolumnchooser/eggcolumnchooserdialog.c	Thu Mar 26 11:16:25 2009
@@ -54,7 +54,8 @@
 			NULL,
 			sizeof (EggColumnChooserDialog),
 			0,
-			(GInstanceInitFunc) egg_column_chooser_dialog_init
+			(GInstanceInitFunc) egg_column_chooser_dialog_init,
+                        0
 		};
 
 		object_type = g_type_register_static (GTK_TYPE_DIALOG, "EggColumnChooserDialog", &object_info, (GTypeFlags)0);
@@ -107,7 +108,7 @@
 {
 	GtkTreePath *path;
 	GtkTreeIter iter;
-	GValue value = {0, };
+	GValue value = { 0, 0 };
 	GtkTreeModel *model = GTK_TREE_MODEL (dialog->column_model);
 	
 	path = gtk_tree_path_new_from_string (path_str);

Modified: trunk/glom/utility_widgets/canvas/Makefile.am
==============================================================================
--- trunk/glom/utility_widgets/canvas/Makefile.am	(original)
+++ trunk/glom/utility_widgets/canvas/Makefile.am	Thu Mar 26 11:16:25 2009
@@ -1,11 +1,11 @@
-#AM_CPPFLAGS = -I top_srcdir@/ $(GLOM_CFLAGS)
+#AM_CPPFLAGS = -I top_srcdir@/ $(GLOM_CFLAGS) $(GLOM_WARNING_FLAGS)
 
 #SUBDIRS = 
 
 gladedir = $(datadir)/glom/glade/
 
 # We define GLOM_GLADEDIR so that we can get the installed .glade file at runtime.
-AM_CPPFLAGS = -I top_srcdir@/ -I top_srcdir@/glom $(GLOM_CFLAGS) $(PYTHON_INCLUDES) \
+AM_CPPFLAGS = -I top_srcdir@/ -I top_srcdir@/glom $(GLOM_CFLAGS) $(GLOM_WARNING_FLAGS) $(PYTHON_INCLUDES) \
            -DGLOM_GLADEDIR=\""$(gladedir)/"\" \
            -DDATADIR=\""$(datadir)"\"
 

Modified: trunk/glom/utility_widgets/canvas/canvas_group_grid.cc
==============================================================================
--- trunk/glom/utility_widgets/canvas/canvas_group_grid.cc	(original)
+++ trunk/glom/utility_widgets/canvas/canvas_group_grid.cc	Thu Mar 26 11:16:25 2009
@@ -209,7 +209,7 @@
   if(m_grid_lines)
   {
     m_grid_lines->remove();
-    m_grid_lines.clear(); //Null the RefPtr.
+    m_grid_lines.reset(); //Null the RefPtr.
   }
 
   while(m_grid_rules_group && m_grid_rules_group->get_n_children())

Modified: trunk/glom/utility_widgets/cellrendererlist/Makefile.am
==============================================================================
--- trunk/glom/utility_widgets/cellrendererlist/Makefile.am	(original)
+++ trunk/glom/utility_widgets/cellrendererlist/Makefile.am	Thu Mar 26 11:16:25 2009
@@ -1,6 +1,6 @@
 SUBDIRS = 
 
-AM_CPPFLAGS = -I top_srcdir@/ -I top_srcdir@/glom $(GLOM_CFLAGS)
+AM_CPPFLAGS = -I top_srcdir@/ -I top_srcdir@/glom $(GLOM_CFLAGS) $(GLOM_WARNING_FLAGS)
 
 noinst_LIBRARIES = libutility_widgets_cellrendererlist.a
 libutility_widgets_cellrendererlist_a_SOURCES = cellrendererlist.h cellrendererlist.cc 

Modified: trunk/glom/utility_widgets/db_adddel/Makefile.am
==============================================================================
--- trunk/glom/utility_widgets/db_adddel/Makefile.am	(original)
+++ trunk/glom/utility_widgets/db_adddel/Makefile.am	Thu Mar 26 11:16:25 2009
@@ -1,6 +1,6 @@
 SUBDIRS = 
 
-AM_CPPFLAGS = -I top_srcdir@/ -I top_srcdir@/glom $(GLOM_CFLAGS)
+AM_CPPFLAGS = -I top_srcdir@/ -I top_srcdir@/glom $(GLOM_CFLAGS) $(GLOM_WARNING_FLAGS)
 
 noinst_LIBRARIES = libutility_widgets_db_adddel.a
 libutility_widgets_db_adddel_a_SOURCES = db_adddel.cc db_adddel.h db_adddel_withbuttons.cc db_adddel_withbuttons.h \

Modified: trunk/macros/Makefile.am
==============================================================================
--- trunk/macros/Makefile.am	(original)
+++ trunk/macros/Makefile.am	Thu Mar 26 11:16:25 2009
@@ -1,3 +1,3 @@
-EXTRA_DIST = macros.m4
+EXTRA_DIST = dk-warn.m4
 
 

Modified: trunk/macros/dk-warn.m4
==============================================================================
--- trunk/macros/dk-warn.m4	(original)
+++ trunk/macros/dk-warn.m4	Thu Mar 26 11:16:25 2009
@@ -0,0 +1,114 @@
+## Copyright (c) 2004-2007  Daniel Elstner  <daniel kitta gmail com>
+##
+## This file is part of danielk's Autostuff.
+##
+## danielk's Autostuff is free software; you can redistribute it and/or
+## modify it under the terms of the GNU General Public License as published
+## by the Free Software Foundation; either version 2 of the License, or (at
+## your option) any later version.
+##
+## danielk's Autostuff is distributed in the hope that it will be useful, but
+## WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+## or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+## for more details.
+##
+## You should have received a copy of the GNU General Public License along
+## with danielk's Autostuff; if not, write to the Free Software Foundation,
+## Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+
+#serial 20070116
+
+## DK_ARG_ENABLE_WARNINGS(variable, min-flags, max-flags, [deprecation-prefixes])
+##
+## Provide the --enable-warnings configure argument, set to "min" by default.
+## <min-flags> and <max-flags> should be space-separated lists of compiler
+## warning flags to use with --enable-warnings=min or --enable-warnings=max,
+## respectively.  Warning level "fatal" is the same as "max" but in addition
+## enables -Werror mode.
+##
+## If not empty, <deprecation-prefixes> should be a list of module prefixes
+## which is expanded to -D<module>_DISABLE_DEPRECATED flags if fatal warnings
+## are enabled, too.
+##
+AC_DEFUN([DK_ARG_ENABLE_WARNINGS],
+[dnl
+m4_if([$3],, [AC_FATAL([3 arguments expected])])[]dnl
+dnl
+AC_ARG_ENABLE([warnings], [AS_HELP_STRING(
+  [--enable-warnings=@<:@min|max|fatal|no@:>@],
+  [control compiler pickyness @<:@min@:>@])],
+  [dk_enable_warnings=$enableval],
+  [dk_enable_warnings=min])[]dnl
+
+dk_lang=
+case $ac_compile in
+  *'$CXXFLAGS '*)
+    dk_lang='C++'
+    dk_cc=$CXX
+    dk_conftest=conftest.${ac_ext-cc}
+    ;;
+  *'$CFLAGS '*)
+    dk_lang=C
+    dk_cc=$CC
+    dk_conftest=conftest.${ac_ext-c}
+    ;;
+esac
+
+AS_IF([test "x$dk_lang" != x],
+[
+  AC_MSG_CHECKING([which $dk_lang compiler warning flags to use])
+
+  case $dk_enable_warnings in
+    no)     dk_warning_flags=;;
+    max)    dk_warning_flags="$3";;
+    fatal)  dk_warning_flags="$3 -Werror";;
+    *)      dk_warning_flags="$2";;
+  esac
+
+  dk_deprecation_flags=
+m4_if([$4],,, [
+  AS_IF([test "x$dk_enable_warnings" = xfatal],
+  [
+    dk_deprecation_prefixes="$4"
+    for dk_prefix in $dk_deprecation_prefixes
+    do
+      dk_deprecation_flags="${dk_deprecation_flags}-D${dk_prefix}_DISABLE_DEPRECATED "
+    done
+  ])
+])[]dnl
+  dk_tested_flags=
+
+  AS_IF([test "x$dk_warning_flags" != x],
+  [
+    # Keep in mind that the dummy source must be devoid of any
+    # problems that might cause diagnostics.
+    AC_LANG_CONFTEST([AC_LANG_SOURCE(
+      [[int main(int argc, char** argv) { return (argv != 0) ? argc : 0; }]])])
+
+    for dk_flag in $dk_warning_flags
+    do
+      # Test whether the compiler accepts the flag.  GCC doesn't bail
+      # out when given an unsupported flag but prints a warning, so
+      # check the compiler output instead.
+      dk_cc_out=`$dk_cc $dk_tested_flags $dk_flag -c "$dk_conftest" 2>&1 || echo failed`
+      rm -f "conftest.${OBJEXT-o}"
+
+      AS_IF([test "x$dk_cc_out" = x],
+      [
+        AS_IF([test "x$dk_tested_flags" = x],
+              [dk_tested_flags=$dk_flag],
+              [dk_tested_flags="$dk_tested_flags $dk_flag"])
+      ], [
+        echo "$dk_cc_out" >&AS_MESSAGE_LOG_FD
+      ])
+    done
+
+    rm -f "$dk_conftest"
+  ])
+  dk_all_flags=$dk_deprecation_flags$dk_tested_flags
+  AC_SUBST([$1], [$dk_all_flags])
+
+  test "x$dk_all_flags" != x || dk_all_flags=none
+  AC_MSG_RESULT([$dk_all_flags])
+])
+])

Modified: trunk/regression_tests/Makefile.am
==============================================================================
--- trunk/regression_tests/Makefile.am	(original)
+++ trunk/regression_tests/Makefile.am	Thu Mar 26 11:16:25 2009
@@ -1,4 +1,4 @@
-AM_CPPFLAGS = -I top_srcdir@/ -I top_srcdir@/glom $(GLOM_CFLAGS) $(PYTHON_INCLUDES) \
+AM_CPPFLAGS = -I top_srcdir@/ -I top_srcdir@/glom $(GLOM_CFLAGS) $(GLOM_WARNING_FLAGS) $(PYTHON_INCLUDES) \
            $(MAEMO_LAUNCHER_CFLAGS) \
            -DGLOM_GLADEDIR=\""$(gladedir)/"\" \
            -DLOCALEDIR=\""$(datadir)/locale"\" \



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