fix some minor errors reported by clang's "scan-build" tool

This commit is contained in:
Charles Kerr
2008-07-18 18:14:29 +00:00
parent 959fbba39c
commit bb6b471e8b
6 changed files with 7 additions and 32 deletions

View File

@@ -133,21 +133,6 @@ static GtkActionEntry entries[] =
N_("Ask Tracker for _More Peers"), NULL, NULL, G_CALLBACK(action_cb) }
};
static void
ensure_tooltip (GtkActionEntry * e)
{
if( !e->tooltip && e->label )
{
const char * src;
char *tgt;
e->tooltip = g_malloc( strlen( e->label ) + 1 );
for( src=e->label, tgt=(char*)e->tooltip; *src; ++src )
if( *src != '_' )
*tgt++ = *src;
*tgt++ = '\0';
}
}
typedef struct
{
const guint8* raw;
@@ -213,10 +198,7 @@ actions_init( GtkUIManager * ui_manager, gpointer callback_user_data )
myUIManager = ui_manager;
register_my_icons ();
for( i=0; i<n_entries; ++i )
ensure_tooltip (&entries[i]);
register_my_icons( );
action_group = myGroup = gtk_action_group_new( "Actions" );
gtk_action_group_set_translation_domain( action_group, NULL );