mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-23 22:16:16 +01:00
Several minor ANSI C fixes.
2000-09-29 Martin Baulig <baulig@suse.de> Several minor ANSI C fixes. Added missing casts: * gdate.c (g_date_fill_parse_tokens): `s = (guchar *) str'. * gmain.c (g_idle_dispatch): `func = (GSourceFunc) source_data'. (g_idle_add_full): `(gpointer) function' in call to g_source_add(). * gstrfuncs.c (g_strdown): `s = (guchar *) string' and `return (gchar *) string'. (g_strup): Likewise. (g_strchug): `start = (guchar*) string' in 1st for() argument; `strlen ((gchar *) start)' in call to g_memmove(). * gstring.c (g_string_down): `s = (guchar *) string->str'. (g_string_up): Likewise. * gthreadpool.c (stop_this_thread_marker): `(gpointer) &g_thread_pool_new'. * gunidecomp.h (decomp_table[]): Cast all the strings to `unsigned char *'. Put text following #endif into comments: * gmain.c: here.
This commit is contained in:
parent
7633908c93
commit
a3fc275ddd
23
ChangeLog
23
ChangeLog
@ -1,3 +1,26 @@
|
||||
2000-09-29 Martin Baulig <baulig@suse.de>
|
||||
|
||||
Several minor ANSI C fixes.
|
||||
|
||||
Added missing casts:
|
||||
* gdate.c (g_date_fill_parse_tokens): `s = (guchar *) str'.
|
||||
* gmain.c (g_idle_dispatch): `func = (GSourceFunc) source_data'.
|
||||
(g_idle_add_full): `(gpointer) function' in call to g_source_add().
|
||||
* gstrfuncs.c (g_strdown): `s = (guchar *) string' and
|
||||
`return (gchar *) string'.
|
||||
(g_strup): Likewise.
|
||||
(g_strchug): `start = (guchar*) string' in 1st for() argument;
|
||||
`strlen ((gchar *) start)' in call to g_memmove().
|
||||
* gstring.c (g_string_down): `s = (guchar *) string->str'.
|
||||
(g_string_up): Likewise.
|
||||
* gthreadpool.c (stop_this_thread_marker):
|
||||
`(gpointer) &g_thread_pool_new'.
|
||||
* gunidecomp.h (decomp_table[]): Cast all the strings to
|
||||
`unsigned char *'.
|
||||
|
||||
Put text following #endif into comments:
|
||||
* gmain.c: here.
|
||||
|
||||
2000-09-29 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||
|
||||
* configure.in, glib.h: Added errorcheck mutexes. These are
|
||||
|
@ -1,3 +1,26 @@
|
||||
2000-09-29 Martin Baulig <baulig@suse.de>
|
||||
|
||||
Several minor ANSI C fixes.
|
||||
|
||||
Added missing casts:
|
||||
* gdate.c (g_date_fill_parse_tokens): `s = (guchar *) str'.
|
||||
* gmain.c (g_idle_dispatch): `func = (GSourceFunc) source_data'.
|
||||
(g_idle_add_full): `(gpointer) function' in call to g_source_add().
|
||||
* gstrfuncs.c (g_strdown): `s = (guchar *) string' and
|
||||
`return (gchar *) string'.
|
||||
(g_strup): Likewise.
|
||||
(g_strchug): `start = (guchar*) string' in 1st for() argument;
|
||||
`strlen ((gchar *) start)' in call to g_memmove().
|
||||
* gstring.c (g_string_down): `s = (guchar *) string->str'.
|
||||
(g_string_up): Likewise.
|
||||
* gthreadpool.c (stop_this_thread_marker):
|
||||
`(gpointer) &g_thread_pool_new'.
|
||||
* gunidecomp.h (decomp_table[]): Cast all the strings to
|
||||
`unsigned char *'.
|
||||
|
||||
Put text following #endif into comments:
|
||||
* gmain.c: here.
|
||||
|
||||
2000-09-29 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||
|
||||
* configure.in, glib.h: Added errorcheck mutexes. These are
|
||||
|
@ -1,3 +1,26 @@
|
||||
2000-09-29 Martin Baulig <baulig@suse.de>
|
||||
|
||||
Several minor ANSI C fixes.
|
||||
|
||||
Added missing casts:
|
||||
* gdate.c (g_date_fill_parse_tokens): `s = (guchar *) str'.
|
||||
* gmain.c (g_idle_dispatch): `func = (GSourceFunc) source_data'.
|
||||
(g_idle_add_full): `(gpointer) function' in call to g_source_add().
|
||||
* gstrfuncs.c (g_strdown): `s = (guchar *) string' and
|
||||
`return (gchar *) string'.
|
||||
(g_strup): Likewise.
|
||||
(g_strchug): `start = (guchar*) string' in 1st for() argument;
|
||||
`strlen ((gchar *) start)' in call to g_memmove().
|
||||
* gstring.c (g_string_down): `s = (guchar *) string->str'.
|
||||
(g_string_up): Likewise.
|
||||
* gthreadpool.c (stop_this_thread_marker):
|
||||
`(gpointer) &g_thread_pool_new'.
|
||||
* gunidecomp.h (decomp_table[]): Cast all the strings to
|
||||
`unsigned char *'.
|
||||
|
||||
Put text following #endif into comments:
|
||||
* gmain.c: here.
|
||||
|
||||
2000-09-29 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||
|
||||
* configure.in, glib.h: Added errorcheck mutexes. These are
|
||||
|
@ -1,3 +1,26 @@
|
||||
2000-09-29 Martin Baulig <baulig@suse.de>
|
||||
|
||||
Several minor ANSI C fixes.
|
||||
|
||||
Added missing casts:
|
||||
* gdate.c (g_date_fill_parse_tokens): `s = (guchar *) str'.
|
||||
* gmain.c (g_idle_dispatch): `func = (GSourceFunc) source_data'.
|
||||
(g_idle_add_full): `(gpointer) function' in call to g_source_add().
|
||||
* gstrfuncs.c (g_strdown): `s = (guchar *) string' and
|
||||
`return (gchar *) string'.
|
||||
(g_strup): Likewise.
|
||||
(g_strchug): `start = (guchar*) string' in 1st for() argument;
|
||||
`strlen ((gchar *) start)' in call to g_memmove().
|
||||
* gstring.c (g_string_down): `s = (guchar *) string->str'.
|
||||
(g_string_up): Likewise.
|
||||
* gthreadpool.c (stop_this_thread_marker):
|
||||
`(gpointer) &g_thread_pool_new'.
|
||||
* gunidecomp.h (decomp_table[]): Cast all the strings to
|
||||
`unsigned char *'.
|
||||
|
||||
Put text following #endif into comments:
|
||||
* gmain.c: here.
|
||||
|
||||
2000-09-29 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||
|
||||
* configure.in, glib.h: Added errorcheck mutexes. These are
|
||||
|
@ -1,3 +1,26 @@
|
||||
2000-09-29 Martin Baulig <baulig@suse.de>
|
||||
|
||||
Several minor ANSI C fixes.
|
||||
|
||||
Added missing casts:
|
||||
* gdate.c (g_date_fill_parse_tokens): `s = (guchar *) str'.
|
||||
* gmain.c (g_idle_dispatch): `func = (GSourceFunc) source_data'.
|
||||
(g_idle_add_full): `(gpointer) function' in call to g_source_add().
|
||||
* gstrfuncs.c (g_strdown): `s = (guchar *) string' and
|
||||
`return (gchar *) string'.
|
||||
(g_strup): Likewise.
|
||||
(g_strchug): `start = (guchar*) string' in 1st for() argument;
|
||||
`strlen ((gchar *) start)' in call to g_memmove().
|
||||
* gstring.c (g_string_down): `s = (guchar *) string->str'.
|
||||
(g_string_up): Likewise.
|
||||
* gthreadpool.c (stop_this_thread_marker):
|
||||
`(gpointer) &g_thread_pool_new'.
|
||||
* gunidecomp.h (decomp_table[]): Cast all the strings to
|
||||
`unsigned char *'.
|
||||
|
||||
Put text following #endif into comments:
|
||||
* gmain.c: here.
|
||||
|
||||
2000-09-29 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||
|
||||
* configure.in, glib.h: Added errorcheck mutexes. These are
|
||||
|
@ -1,3 +1,26 @@
|
||||
2000-09-29 Martin Baulig <baulig@suse.de>
|
||||
|
||||
Several minor ANSI C fixes.
|
||||
|
||||
Added missing casts:
|
||||
* gdate.c (g_date_fill_parse_tokens): `s = (guchar *) str'.
|
||||
* gmain.c (g_idle_dispatch): `func = (GSourceFunc) source_data'.
|
||||
(g_idle_add_full): `(gpointer) function' in call to g_source_add().
|
||||
* gstrfuncs.c (g_strdown): `s = (guchar *) string' and
|
||||
`return (gchar *) string'.
|
||||
(g_strup): Likewise.
|
||||
(g_strchug): `start = (guchar*) string' in 1st for() argument;
|
||||
`strlen ((gchar *) start)' in call to g_memmove().
|
||||
* gstring.c (g_string_down): `s = (guchar *) string->str'.
|
||||
(g_string_up): Likewise.
|
||||
* gthreadpool.c (stop_this_thread_marker):
|
||||
`(gpointer) &g_thread_pool_new'.
|
||||
* gunidecomp.h (decomp_table[]): Cast all the strings to
|
||||
`unsigned char *'.
|
||||
|
||||
Put text following #endif into comments:
|
||||
* gmain.c: here.
|
||||
|
||||
2000-09-29 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||
|
||||
* configure.in, glib.h: Added errorcheck mutexes. These are
|
||||
|
@ -1,3 +1,26 @@
|
||||
2000-09-29 Martin Baulig <baulig@suse.de>
|
||||
|
||||
Several minor ANSI C fixes.
|
||||
|
||||
Added missing casts:
|
||||
* gdate.c (g_date_fill_parse_tokens): `s = (guchar *) str'.
|
||||
* gmain.c (g_idle_dispatch): `func = (GSourceFunc) source_data'.
|
||||
(g_idle_add_full): `(gpointer) function' in call to g_source_add().
|
||||
* gstrfuncs.c (g_strdown): `s = (guchar *) string' and
|
||||
`return (gchar *) string'.
|
||||
(g_strup): Likewise.
|
||||
(g_strchug): `start = (guchar*) string' in 1st for() argument;
|
||||
`strlen ((gchar *) start)' in call to g_memmove().
|
||||
* gstring.c (g_string_down): `s = (guchar *) string->str'.
|
||||
(g_string_up): Likewise.
|
||||
* gthreadpool.c (stop_this_thread_marker):
|
||||
`(gpointer) &g_thread_pool_new'.
|
||||
* gunidecomp.h (decomp_table[]): Cast all the strings to
|
||||
`unsigned char *'.
|
||||
|
||||
Put text following #endif into comments:
|
||||
* gmain.c: here.
|
||||
|
||||
2000-09-29 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||
|
||||
* configure.in, glib.h: Added errorcheck mutexes. These are
|
||||
|
@ -1,3 +1,26 @@
|
||||
2000-09-29 Martin Baulig <baulig@suse.de>
|
||||
|
||||
Several minor ANSI C fixes.
|
||||
|
||||
Added missing casts:
|
||||
* gdate.c (g_date_fill_parse_tokens): `s = (guchar *) str'.
|
||||
* gmain.c (g_idle_dispatch): `func = (GSourceFunc) source_data'.
|
||||
(g_idle_add_full): `(gpointer) function' in call to g_source_add().
|
||||
* gstrfuncs.c (g_strdown): `s = (guchar *) string' and
|
||||
`return (gchar *) string'.
|
||||
(g_strup): Likewise.
|
||||
(g_strchug): `start = (guchar*) string' in 1st for() argument;
|
||||
`strlen ((gchar *) start)' in call to g_memmove().
|
||||
* gstring.c (g_string_down): `s = (guchar *) string->str'.
|
||||
(g_string_up): Likewise.
|
||||
* gthreadpool.c (stop_this_thread_marker):
|
||||
`(gpointer) &g_thread_pool_new'.
|
||||
* gunidecomp.h (decomp_table[]): Cast all the strings to
|
||||
`unsigned char *'.
|
||||
|
||||
Put text following #endif into comments:
|
||||
* gmain.c: here.
|
||||
|
||||
2000-09-29 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
|
||||
|
||||
* configure.in, glib.h: Added errorcheck mutexes. These are
|
||||
|
2
gdate.c
2
gdate.c
@ -465,7 +465,7 @@ g_date_fill_parse_tokens (const gchar *str, GDateParseTokens *pt)
|
||||
*/
|
||||
num[0][0] = num[1][0] = num[2][0] = num[3][0] = '\0';
|
||||
|
||||
s = str;
|
||||
s = (const guchar *) str;
|
||||
pt->num_ints = 0;
|
||||
while (*s && pt->num_ints < 4)
|
||||
{
|
||||
|
@ -465,7 +465,7 @@ g_date_fill_parse_tokens (const gchar *str, GDateParseTokens *pt)
|
||||
*/
|
||||
num[0][0] = num[1][0] = num[2][0] = num[3][0] = '\0';
|
||||
|
||||
s = str;
|
||||
s = (const guchar *) str;
|
||||
pt->num_ints = 0;
|
||||
while (*s && pt->num_ints < 4)
|
||||
{
|
||||
|
@ -744,7 +744,7 @@ g_main_iterate (gboolean block,
|
||||
G_UNLOCK (main_loop);
|
||||
return FALSE;
|
||||
}
|
||||
#endif G_THREADS_ENABLED
|
||||
#endif /* G_THREADS_ENABLED */
|
||||
|
||||
/* If recursing, finish up current dispatch, before starting over */
|
||||
if (pending_dispatches)
|
||||
@ -1403,7 +1403,7 @@ g_idle_dispatch (gpointer source_data,
|
||||
GTimeVal *dispatch_time,
|
||||
gpointer user_data)
|
||||
{
|
||||
GSourceFunc func = source_data;
|
||||
GSourceFunc func = (GSourceFunc) source_data;
|
||||
|
||||
return func (user_data);
|
||||
}
|
||||
@ -1416,7 +1416,7 @@ g_idle_add_full (gint priority,
|
||||
{
|
||||
g_return_val_if_fail (function != NULL, 0);
|
||||
|
||||
return g_source_add (priority, FALSE, &idle_funcs, function, data, notify);
|
||||
return g_source_add (priority, FALSE, &idle_funcs, (gpointer) function, data, notify);
|
||||
}
|
||||
|
||||
guint
|
||||
|
@ -933,7 +933,7 @@ g_strdown (gchar *string)
|
||||
|
||||
g_return_val_if_fail (string != NULL, NULL);
|
||||
|
||||
s = string;
|
||||
s = (guchar *) string;
|
||||
|
||||
while (*s)
|
||||
{
|
||||
@ -941,7 +941,7 @@ g_strdown (gchar *string)
|
||||
s++;
|
||||
}
|
||||
|
||||
return string;
|
||||
return (gchar *) string;
|
||||
}
|
||||
|
||||
gchar*
|
||||
@ -951,7 +951,7 @@ g_strup (gchar *string)
|
||||
|
||||
g_return_val_if_fail (string != NULL, NULL);
|
||||
|
||||
s = string;
|
||||
s = (guchar *) string;
|
||||
|
||||
while (*s)
|
||||
{
|
||||
@ -959,7 +959,7 @@ g_strup (gchar *string)
|
||||
s++;
|
||||
}
|
||||
|
||||
return string;
|
||||
return (gchar *) string;
|
||||
}
|
||||
|
||||
gchar*
|
||||
@ -1455,10 +1455,10 @@ g_strchug (gchar *string)
|
||||
|
||||
g_return_val_if_fail (string != NULL, NULL);
|
||||
|
||||
for (start = string; *start && isspace (*start); start++)
|
||||
for (start = (guchar*) string; *start && isspace (*start); start++)
|
||||
;
|
||||
|
||||
g_memmove (string, start, strlen( start) + 1);
|
||||
g_memmove (string, start, strlen ((gchar *) start) + 1);
|
||||
|
||||
return string;
|
||||
}
|
||||
|
@ -512,7 +512,7 @@ g_string_down (GString *fstring)
|
||||
|
||||
g_return_val_if_fail (string != NULL, NULL);
|
||||
|
||||
s = string->str;
|
||||
s = (guchar *) string->str;
|
||||
|
||||
while (n)
|
||||
{
|
||||
@ -533,7 +533,7 @@ g_string_up (GString *fstring)
|
||||
|
||||
g_return_val_if_fail (string != NULL, NULL);
|
||||
|
||||
s = string->str;
|
||||
s = (guchar *) string->str;
|
||||
|
||||
while (n)
|
||||
{
|
||||
|
@ -42,7 +42,7 @@ struct _GRealThreadPool
|
||||
/* The following is just an address to mark the stop order for a
|
||||
* thread, it could be any address (as long, as it isn;t a valid
|
||||
* GThreadPool address) */
|
||||
static const gpointer stop_this_thread_marker = &g_thread_pool_new;
|
||||
static const gpointer stop_this_thread_marker = (gpointer) &g_thread_pool_new;
|
||||
|
||||
/* Here all unused threads are waiting, depending on their priority */
|
||||
static GAsyncQueue *unused_thread_queue[G_THREAD_PRIORITY_URGENT + 1];
|
||||
|
2532
glib/gunidecomp.h
2532
glib/gunidecomp.h
File diff suppressed because it is too large
Load Diff
6
gmain.c
6
gmain.c
@ -744,7 +744,7 @@ g_main_iterate (gboolean block,
|
||||
G_UNLOCK (main_loop);
|
||||
return FALSE;
|
||||
}
|
||||
#endif G_THREADS_ENABLED
|
||||
#endif /* G_THREADS_ENABLED */
|
||||
|
||||
/* If recursing, finish up current dispatch, before starting over */
|
||||
if (pending_dispatches)
|
||||
@ -1403,7 +1403,7 @@ g_idle_dispatch (gpointer source_data,
|
||||
GTimeVal *dispatch_time,
|
||||
gpointer user_data)
|
||||
{
|
||||
GSourceFunc func = source_data;
|
||||
GSourceFunc func = (GSourceFunc) source_data;
|
||||
|
||||
return func (user_data);
|
||||
}
|
||||
@ -1416,7 +1416,7 @@ g_idle_add_full (gint priority,
|
||||
{
|
||||
g_return_val_if_fail (function != NULL, 0);
|
||||
|
||||
return g_source_add (priority, FALSE, &idle_funcs, function, data, notify);
|
||||
return g_source_add (priority, FALSE, &idle_funcs, (gpointer) function, data, notify);
|
||||
}
|
||||
|
||||
guint
|
||||
|
12
gstrfuncs.c
12
gstrfuncs.c
@ -933,7 +933,7 @@ g_strdown (gchar *string)
|
||||
|
||||
g_return_val_if_fail (string != NULL, NULL);
|
||||
|
||||
s = string;
|
||||
s = (guchar *) string;
|
||||
|
||||
while (*s)
|
||||
{
|
||||
@ -941,7 +941,7 @@ g_strdown (gchar *string)
|
||||
s++;
|
||||
}
|
||||
|
||||
return string;
|
||||
return (gchar *) string;
|
||||
}
|
||||
|
||||
gchar*
|
||||
@ -951,7 +951,7 @@ g_strup (gchar *string)
|
||||
|
||||
g_return_val_if_fail (string != NULL, NULL);
|
||||
|
||||
s = string;
|
||||
s = (guchar *) string;
|
||||
|
||||
while (*s)
|
||||
{
|
||||
@ -959,7 +959,7 @@ g_strup (gchar *string)
|
||||
s++;
|
||||
}
|
||||
|
||||
return string;
|
||||
return (gchar *) string;
|
||||
}
|
||||
|
||||
gchar*
|
||||
@ -1455,10 +1455,10 @@ g_strchug (gchar *string)
|
||||
|
||||
g_return_val_if_fail (string != NULL, NULL);
|
||||
|
||||
for (start = string; *start && isspace (*start); start++)
|
||||
for (start = (guchar*) string; *start && isspace (*start); start++)
|
||||
;
|
||||
|
||||
g_memmove (string, start, strlen( start) + 1);
|
||||
g_memmove (string, start, strlen ((gchar *) start) + 1);
|
||||
|
||||
return string;
|
||||
}
|
||||
|
@ -512,7 +512,7 @@ g_string_down (GString *fstring)
|
||||
|
||||
g_return_val_if_fail (string != NULL, NULL);
|
||||
|
||||
s = string->str;
|
||||
s = (guchar *) string->str;
|
||||
|
||||
while (n)
|
||||
{
|
||||
@ -533,7 +533,7 @@ g_string_up (GString *fstring)
|
||||
|
||||
g_return_val_if_fail (string != NULL, NULL);
|
||||
|
||||
s = string->str;
|
||||
s = (guchar *) string->str;
|
||||
|
||||
while (n)
|
||||
{
|
||||
|
@ -42,7 +42,7 @@ struct _GRealThreadPool
|
||||
/* The following is just an address to mark the stop order for a
|
||||
* thread, it could be any address (as long, as it isn;t a valid
|
||||
* GThreadPool address) */
|
||||
static const gpointer stop_this_thread_marker = &g_thread_pool_new;
|
||||
static const gpointer stop_this_thread_marker = (gpointer) &g_thread_pool_new;
|
||||
|
||||
/* Here all unused threads are waiting, depending on their priority */
|
||||
static GAsyncQueue *unused_thread_queue[G_THREAD_PRIORITY_URGENT + 1];
|
||||
|
2532
gunidecomp.h
2532
gunidecomp.h
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user