From 2e7514d052ca81b12645f0048f280269a443ea5a Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sun, 24 Oct 2004 01:37:42 +0000 Subject: [PATCH] Apply a patch to fix sparse warnings. (#154696, Kjartan Maraas) 2004-10-23 Matthias Clasen * glib/gasyncqueue.c, glib/gatomic.c, glib/gdate.c, glib/giochannel.c, glib/gmain.c, glib/gspawn.c, glib/libcharset/localcharset.c: Apply a patch to fix sparse warnings. (#154696, Kjartan Maraas) --- ChangeLog | 5 +++++ ChangeLog.pre-2-10 | 5 +++++ ChangeLog.pre-2-12 | 5 +++++ ChangeLog.pre-2-6 | 5 +++++ ChangeLog.pre-2-8 | 5 +++++ glib/gasyncqueue.c | 2 +- glib/gatomic.c | 2 +- glib/gdate.c | 2 +- glib/giochannel.c | 2 +- glib/gmain.c | 4 ++-- glib/gspawn.c | 4 ++-- glib/libcharset/localcharset.c | 4 ++-- 12 files changed, 35 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index 98dab90..b6cde97 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2004-10-23 Matthias Clasen + * glib/gasyncqueue.c, glib/gatomic.c, glib/gdate.c, + glib/giochannel.c, glib/gmain.c, glib/gspawn.c, + glib/libcharset/localcharset.c: Apply a patch to fix + sparse warnings. (#154696, Kjartan Maraas) + * glib/gnulib/g-gnulib.h: Undef libc functions before defining them, since they may also be macros. (#155177, Andrea Campi) diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 98dab90..b6cde97 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,5 +1,10 @@ 2004-10-23 Matthias Clasen + * glib/gasyncqueue.c, glib/gatomic.c, glib/gdate.c, + glib/giochannel.c, glib/gmain.c, glib/gspawn.c, + glib/libcharset/localcharset.c: Apply a patch to fix + sparse warnings. (#154696, Kjartan Maraas) + * glib/gnulib/g-gnulib.h: Undef libc functions before defining them, since they may also be macros. (#155177, Andrea Campi) diff --git a/ChangeLog.pre-2-12 b/ChangeLog.pre-2-12 index 98dab90..b6cde97 100644 --- a/ChangeLog.pre-2-12 +++ b/ChangeLog.pre-2-12 @@ -1,5 +1,10 @@ 2004-10-23 Matthias Clasen + * glib/gasyncqueue.c, glib/gatomic.c, glib/gdate.c, + glib/giochannel.c, glib/gmain.c, glib/gspawn.c, + glib/libcharset/localcharset.c: Apply a patch to fix + sparse warnings. (#154696, Kjartan Maraas) + * glib/gnulib/g-gnulib.h: Undef libc functions before defining them, since they may also be macros. (#155177, Andrea Campi) diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 98dab90..b6cde97 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,5 +1,10 @@ 2004-10-23 Matthias Clasen + * glib/gasyncqueue.c, glib/gatomic.c, glib/gdate.c, + glib/giochannel.c, glib/gmain.c, glib/gspawn.c, + glib/libcharset/localcharset.c: Apply a patch to fix + sparse warnings. (#154696, Kjartan Maraas) + * glib/gnulib/g-gnulib.h: Undef libc functions before defining them, since they may also be macros. (#155177, Andrea Campi) diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 98dab90..b6cde97 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,5 +1,10 @@ 2004-10-23 Matthias Clasen + * glib/gasyncqueue.c, glib/gatomic.c, glib/gdate.c, + glib/giochannel.c, glib/gmain.c, glib/gspawn.c, + glib/libcharset/localcharset.c: Apply a patch to fix + sparse warnings. (#154696, Kjartan Maraas) + * glib/gnulib/g-gnulib.h: Undef libc functions before defining them, since they may also be macros. (#155177, Andrea Campi) diff --git a/glib/gasyncqueue.c b/glib/gasyncqueue.c index 75baaa3..c2e941d 100644 --- a/glib/gasyncqueue.c +++ b/glib/gasyncqueue.c @@ -47,7 +47,7 @@ struct _GAsyncQueue * Return value: the new #GAsyncQueue. **/ GAsyncQueue* -g_async_queue_new () +g_async_queue_new (void) { GAsyncQueue* retval = g_new (GAsyncQueue, 1); retval->mutex = g_mutex_new (); diff --git a/glib/gatomic.c b/glib/gatomic.c index 2cb9378..a8aca71 100644 --- a/glib/gatomic.c +++ b/glib/gatomic.c @@ -640,7 +640,7 @@ g_atomic_int_add (gint *atomic, #endif /* ATOMIC_INT_CMP_XCHG */ void -_g_atomic_thread_init () +_g_atomic_thread_init (void) { #ifdef DEFINE_WITH_MUTEXES g_atomic_mutex = g_mutex_new (); diff --git a/glib/gdate.c b/glib/gdate.c index 8d2bb24..73066a4 100644 --- a/glib/gdate.c +++ b/glib/gdate.c @@ -44,7 +44,7 @@ #include GDate* -g_date_new () +g_date_new (void) { GDate *d = g_new0 (GDate, 1); /* happily, 0 is the invalid flag for everything. */ diff --git a/glib/giochannel.c b/glib/giochannel.c index 8a3c2da..1436ab4 100644 --- a/glib/giochannel.c +++ b/glib/giochannel.c @@ -707,7 +707,7 @@ G_CONST_RETURN gchar* g_io_channel_get_line_term (GIOChannel *channel, gint *length) { - g_return_val_if_fail (channel != NULL, 0); + g_return_val_if_fail (channel != NULL, NULL); if (length) *length = channel->line_term_len; diff --git a/glib/gmain.c b/glib/gmain.c index cba3ccd..9fb7d5e 100644 --- a/glib/gmain.c +++ b/glib/gmain.c @@ -711,7 +711,7 @@ g_main_context_init_pipe (GMainContext *context) } void -_g_main_thread_init () +_g_main_thread_init (void) { GSList *curr = main_contexts_without_pipe; while (curr) @@ -732,7 +732,7 @@ _g_main_thread_init () * Return value: the new #GMainContext **/ GMainContext * -g_main_context_new () +g_main_context_new (void) { GMainContext *context = g_new0 (GMainContext, 1); diff --git a/glib/gspawn.c b/glib/gspawn.c index b683cdf..0f7b665 100644 --- a/glib/gspawn.c +++ b/glib/gspawn.c @@ -629,7 +629,7 @@ g_spawn_command_line_sync (const gchar *command_line, GError **error) { gboolean retval; - gchar **argv = 0; + gchar **argv = NULL; g_return_val_if_fail (command_line != NULL, FALSE); @@ -675,7 +675,7 @@ g_spawn_command_line_async (const gchar *command_line, GError **error) { gboolean retval; - gchar **argv = 0; + gchar **argv = NULL; g_return_val_if_fail (command_line != NULL, FALSE); diff --git a/glib/libcharset/localcharset.c b/glib/libcharset/localcharset.c index 2061a88..2b799b8 100644 --- a/glib/libcharset/localcharset.c +++ b/glib/libcharset/localcharset.c @@ -110,7 +110,7 @@ static const char * volatile charset_aliases; /* Return a pointer to the contents of the charset.alias file. */ const char * -_g_locale_get_charset_aliases () +_g_locale_get_charset_aliases (void) { const char *cp; @@ -246,7 +246,7 @@ _g_locale_get_charset_aliases () name. */ const char * -_g_locale_charset_raw () +_g_locale_charset_raw (void) { const char *codeset; -- 2.7.4