add cast to fix const warning.
2008-01-14 Michael Natterer <mitch@imendio.com> * gtk/gtkrc.c (_gtk_rc_style_unset_rc_property): add cast to fix const warning. (gtk_rc_parse_any): change variables to const and introduce another local variable to fix const warnings. svn path=/trunk/; revision=19371
This commit is contained in:

committed by
Michael Natterer

parent
bbaf1be625
commit
7a658c1389
@ -1,3 +1,11 @@
|
|||||||
|
2008-01-14 Michael Natterer <mitch@imendio.com>
|
||||||
|
|
||||||
|
* gtk/gtkrc.c (_gtk_rc_style_unset_rc_property): add cast to fix
|
||||||
|
const warning.
|
||||||
|
|
||||||
|
(gtk_rc_parse_any): change variables to const and introduce
|
||||||
|
another local variable to fix const warnings.
|
||||||
|
|
||||||
2008-01-14 Michael Natterer <mitch@imendio.com>
|
2008-01-14 Michael Natterer <mitch@imendio.com>
|
||||||
|
|
||||||
* gdk/gdkscreen.c (gdk_screen_get_property): cast the return value
|
* gdk/gdkscreen.c (gdk_screen_get_property): cast the return value
|
||||||
|
21
gtk/gtkrc.c
21
gtk/gtkrc.c
@ -1285,7 +1285,9 @@ _gtk_rc_style_unset_rc_property (GtkRcStyle *rc_style,
|
|||||||
|
|
||||||
g_return_if_fail (GTK_IS_RC_STYLE (rc_style));
|
g_return_if_fail (GTK_IS_RC_STYLE (rc_style));
|
||||||
|
|
||||||
node = _gtk_rc_style_lookup_rc_property (rc_style, type_name, property_name);
|
node = (GtkRcProperty *) _gtk_rc_style_lookup_rc_property (rc_style,
|
||||||
|
type_name,
|
||||||
|
property_name);
|
||||||
|
|
||||||
if (node != NULL)
|
if (node != NULL)
|
||||||
{
|
{
|
||||||
@ -2253,11 +2255,9 @@ gtk_rc_parse_any (GtkRcContext *context,
|
|||||||
|
|
||||||
if (expected_token != G_TOKEN_NONE)
|
if (expected_token != G_TOKEN_NONE)
|
||||||
{
|
{
|
||||||
gchar *symbol_name;
|
const gchar *symbol_name = NULL;
|
||||||
gchar *msg;
|
gchar *msg = NULL;
|
||||||
|
|
||||||
msg = NULL;
|
|
||||||
symbol_name = NULL;
|
|
||||||
if (scanner->scope_id == 0)
|
if (scanner->scope_id == 0)
|
||||||
{
|
{
|
||||||
/* if we are in scope 0, we know the symbol names
|
/* if we are in scope 0, we know the symbol names
|
||||||
@ -2268,12 +2268,16 @@ gtk_rc_parse_any (GtkRcContext *context,
|
|||||||
if (expected_token > GTK_RC_TOKEN_INVALID &&
|
if (expected_token > GTK_RC_TOKEN_INVALID &&
|
||||||
expected_token < GTK_RC_TOKEN_LAST)
|
expected_token < GTK_RC_TOKEN_LAST)
|
||||||
{
|
{
|
||||||
|
const gchar *sym = NULL;
|
||||||
|
|
||||||
for (i = 0; i < G_N_ELEMENTS (symbols); i++)
|
for (i = 0; i < G_N_ELEMENTS (symbols); i++)
|
||||||
if (symbols[i].token == expected_token)
|
if (symbols[i].token == expected_token)
|
||||||
msg = symbol_names + symbols[i].name_offset;
|
sym = symbol_names + symbols[i].name_offset;
|
||||||
if (msg)
|
|
||||||
msg = g_strconcat ("e.g. `", msg, "'", NULL);
|
if (sym)
|
||||||
|
msg = g_strconcat ("e.g. `", sym, "'", NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (scanner->token > GTK_RC_TOKEN_INVALID &&
|
if (scanner->token > GTK_RC_TOKEN_INVALID &&
|
||||||
scanner->token < GTK_RC_TOKEN_LAST)
|
scanner->token < GTK_RC_TOKEN_LAST)
|
||||||
{
|
{
|
||||||
@ -2283,6 +2287,7 @@ gtk_rc_parse_any (GtkRcContext *context,
|
|||||||
symbol_name = symbol_names + symbols[i].name_offset;
|
symbol_name = symbol_names + symbols[i].name_offset;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
g_scanner_unexp_token (scanner,
|
g_scanner_unexp_token (scanner,
|
||||||
expected_token,
|
expected_token,
|
||||||
NULL,
|
NULL,
|
||||||
|
Reference in New Issue
Block a user