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:
Martin Baulig
2000-09-29 13:37:01 +00:00
committed by Martin Baulig
parent 7633908c93
commit a3fc275ddd
20 changed files with 2742 additions and 2558 deletions

View File

@@ -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;
}