work around a gcc 2.96 bug (fixes #77121)

2002-05-10  jacob berkman  <jacob@ximian.com>

	* mime-type-info.c (mime_category_info_get_full_description):
	(mime_category_info_get_full_name): work around a gcc 2.96 bug
	(fixes #77121)
This commit is contained in:
jacob berkman 2002-05-10 16:39:21 +00:00 committed by Jacob Berkman
parent 5000af2e58
commit d9a3c9ab29
2 changed files with 17 additions and 4 deletions

View file

@ -1,3 +1,9 @@
2002-05-10 jacob berkman <jacob@ximian.com>
* mime-type-info.c (mime_category_info_get_full_description):
(mime_category_info_get_full_name): work around a gcc 2.96 bug
(fixes #77121)
2002-05-08 Jody Goldberg <jody@gnome.org>
* file-types-capplet.c (cb_file_type_dialog_response) : fix path to

View file

@ -606,7 +606,7 @@ mime_category_info_get_full_name (MimeCategoryInfo *info)
{
GString *string;
ModelEntry *tmp;
gchar *ret;
gchar *ret, *s;
string = g_string_new ("");
@ -615,7 +615,10 @@ mime_category_info_get_full_name (MimeCategoryInfo *info)
g_string_prepend (string, "/");
}
ret = g_strdup ((*string->str == '\0') ? string->str : string->str + 1);
/* work around gcc 2.96 bug */
s = (*string->str == '\0') ? string->str : string->str + 1;
ret = g_strdup (s);
g_string_free (string, TRUE);
return ret;
}
@ -625,7 +628,7 @@ mime_category_info_get_full_description (MimeCategoryInfo *info)
{
GString *string;
ModelEntry *tmp;
gchar *ret;
gchar *ret, *s;
string = g_string_new ("");
@ -634,7 +637,11 @@ mime_category_info_get_full_description (MimeCategoryInfo *info)
g_string_prepend (string, "/");
}
ret = g_strdup ((*string->str == '\0') ? string->str : string->str + 1);
/* work around gcc 2.96 bug */
s = (*string->str == '\0') ? string->str : string->str + 1;
ret = g_strdup (s);
g_string_free (string, TRUE);
return ret;
}