From 92ac8d165eae438164cffce01fe92cdcf6488970 Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Fri, 1 May 2009 10:08:52 -0400 Subject: [PATCH] Misc warning fixes glib/pcre/pcre_ucp_search_funcs.c, glib/pcre/pcre_valid_utf8.c: add back missing config.h includes, and this time add them to the copies in glib/update-pcre/ too so they don't get lost again on the next PCRE update. glib/garray.c, glib/gbase64.c: fix signed/unsigned pointer casts gio/xdgmime/xdgmimeglob.c: remove unused variable gio/tests/live-g-file.c: fix printf args on x86_64 tests/Makefile.am, tests/regex-test.c: remove redundant -DENABLE_REGEX --- gio/tests/live-g-file.c | 4 ++-- gio/xdgmime/xdgmimeglob.c | 1 - glib/garray.c | 2 +- glib/gbase64.c | 2 +- glib/pcre/pcre_ucp_searchfuncs.c | 4 ++++ glib/pcre/pcre_valid_utf8.c | 1 + glib/update-pcre/pcre_ucp_searchfuncs.c | 4 ++++ glib/update-pcre/pcre_valid_utf8.c | 1 + tests/Makefile.am | 9 +-------- tests/regex-test.c | 2 ++ 10 files changed, 17 insertions(+), 13 deletions(-) diff --git a/gio/tests/live-g-file.c b/gio/tests/live-g-file.c index fe11d318..0b074df2 100644 --- a/gio/tests/live-g-file.c +++ b/gio/tests/live-g-file.c @@ -458,8 +458,8 @@ test_initial_structure (gconstpointer test_data) PATTERN_FILE_SIZE, NULL, &error); g_assert_no_error (error); total_read += read; - log (" read %d bytes, total = %d of %d.\n", read, total_read, - PATTERN_FILE_SIZE); + log (" read %d bytes, total = %d of %d.\n", (int) read, + (int) total_read, PATTERN_FILE_SIZE); } g_assert_cmpint (total_read, ==, PATTERN_FILE_SIZE); diff --git a/gio/xdgmime/xdgmimeglob.c b/gio/xdgmime/xdgmimeglob.c index 22acd3e0..d7c79b17 100644 --- a/gio/xdgmime/xdgmimeglob.c +++ b/gio/xdgmime/xdgmimeglob.c @@ -375,7 +375,6 @@ _xdg_glob_hash_lookup_file_name (XdgGlobHash *glob_hash, int i, n; MimeWeight mimes[10]; int n_mimes = 10; - xdg_unichar_t *ucs4; int len; /* First, check the literals */ diff --git a/glib/garray.c b/glib/garray.c index 64f70e77..8cb6e1d8 100644 --- a/glib/garray.c +++ b/glib/garray.c @@ -181,7 +181,7 @@ g_array_free (GArray *farray, segment = NULL; } else - segment = array->data; + segment = (gchar*) array->data; if (preserve_wrapper) { diff --git a/glib/gbase64.c b/glib/gbase64.c index bfdc76aa..bebff76e 100644 --- a/glib/gbase64.c +++ b/glib/gbase64.c @@ -415,7 +415,7 @@ g_base64_decode_inplace (gchar *text, *out_len = g_base64_decode_step (text, input_length, (guchar *) text, &state, &save); - return text; + return (guchar *) text; } diff --git a/glib/pcre/pcre_ucp_searchfuncs.c b/glib/pcre/pcre_ucp_searchfuncs.c index 9060fbcc..3e1ed38f 100644 --- a/glib/pcre/pcre_ucp_searchfuncs.c +++ b/glib/pcre/pcre_ucp_searchfuncs.c @@ -43,6 +43,10 @@ POSSIBILITY OF SUCH DAMAGE. /* This module contains code for searching the table of Unicode character properties. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include "pcre_internal.h" #include "ucp.h" /* Category definitions */ diff --git a/glib/pcre/pcre_valid_utf8.c b/glib/pcre/pcre_valid_utf8.c index a5766b45..b7671a96 100644 --- a/glib/pcre/pcre_valid_utf8.c +++ b/glib/pcre/pcre_valid_utf8.c @@ -1,3 +1,4 @@ +#include "config.h" #include "pcre_internal.h" /* diff --git a/glib/update-pcre/pcre_ucp_searchfuncs.c b/glib/update-pcre/pcre_ucp_searchfuncs.c index b95d2794..77ec8d14 100644 --- a/glib/update-pcre/pcre_ucp_searchfuncs.c +++ b/glib/update-pcre/pcre_ucp_searchfuncs.c @@ -43,6 +43,10 @@ POSSIBILITY OF SUCH DAMAGE. /* This module contains code for searching the table of Unicode character properties. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include "pcre_internal.h" #include "ucp.h" /* Category definitions */ diff --git a/glib/update-pcre/pcre_valid_utf8.c b/glib/update-pcre/pcre_valid_utf8.c index a5766b45..b7671a96 100644 --- a/glib/update-pcre/pcre_valid_utf8.c +++ b/glib/update-pcre/pcre_valid_utf8.c @@ -1,3 +1,4 @@ +#include "config.h" #include "pcre_internal.h" /* diff --git a/tests/Makefile.am b/tests/Makefile.am index 57f1555f..da139764 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -2,18 +2,11 @@ include $(top_srcdir)/Makefile.decl SUBDIRS=gobject refcount -if ENABLE_REGEX -enable_regex = -DENABLE_REGEX -else -enable_regex = -endif - AM_CPPFLAGS = \ -I$(top_srcdir) \ -I$(top_srcdir)/glib \ -I$(top_srcdir)/gmodule \ - $(GLIB_DEBUG_FLAGS) \ - $(enable_regex) + $(GLIB_DEBUG_FLAGS) AM_CFLAGS = -g diff --git a/tests/regex-test.c b/tests/regex-test.c index 2e000513..6ad9ceb7 100644 --- a/tests/regex-test.c +++ b/tests/regex-test.c @@ -20,6 +20,8 @@ #undef G_DISABLE_ASSERT #undef G_LOG_DOMAIN +#include "config.h" + #include #include #include "glib.h" -- 2.34.1