gnome-terminal r2983 - trunk/src
- From: chpe svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-terminal r2983 - trunk/src
- Date: Thu, 14 Aug 2008 19:38:29 +0000 (UTC)
Author: chpe
Date: Thu Aug 14 19:38:29 2008
New Revision: 2983
URL: http://svn.gnome.org/viewvc/gnome-terminal?rev=2983&view=rev
Log:
Bug 541338 â Warning on compile
Based on a patch by Craig Keogh.
Modified:
trunk/src/terminal-app.c
Modified: trunk/src/terminal-app.c
==============================================================================
--- trunk/src/terminal-app.c (original)
+++ trunk/src/terminal-app.c Thu Aug 14 19:38:29 2008
@@ -231,13 +231,14 @@
const char *name, *profile_name;
char *gconf_dir;
GError *error = NULL;
+ const char **nameptr = &name;
profile_name = terminal_profile_get_property_string (profile, TERMINAL_PROFILE_NAME);
gconf_dir = gconf_concat_dir_and_key (CONF_PREFIX "/profiles", profile_name);
name_list = NULL;
g_hash_table_iter_init (&iter, app->profiles);
- while (g_hash_table_iter_next (&iter, (gpointer*) &name, NULL))
+ while (g_hash_table_iter_next (&iter, (gpointer *) nameptr, NULL))
{
if (strcmp (name, profile_name) == 0)
continue;
@@ -753,6 +754,7 @@
if (need_new_default)
{
TerminalProfile *new_default;
+ TerminalProfile **new_default_ptr = &new_default;
new_default = terminal_app_get_profile_by_name (app, FALLBACK_PROFILE_ID);
if (new_default == NULL)
@@ -760,7 +762,7 @@
GHashTableIter iter;
g_hash_table_iter_init (&iter, app->profiles);
- if (!g_hash_table_iter_next (&iter, NULL, (gpointer *) &new_default))
+ if (!g_hash_table_iter_next (&iter, NULL, (gpointer *) new_default_ptr))
/* shouldn't really happen ever, but just to be safe */
new_default = terminal_app_create_profile (app, FALLBACK_PROFILE_ID);
}
@@ -1754,6 +1756,7 @@
{
GHashTableIter iter;
TerminalProfile *profile = NULL;
+ TerminalProfile **profileptr = &profile;
g_return_val_if_fail (TERMINAL_IS_APP (app), NULL);
@@ -1761,7 +1764,7 @@
return app->default_profile;
g_hash_table_iter_init (&iter, app->profiles);
- if (g_hash_table_iter_next (&iter, NULL, (gpointer*) &profile))
+ if (g_hash_table_iter_next (&iter, NULL, (gpointer *) profileptr))
return profile;
return NULL;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]