mirror of
https://github.com/transmission/transmission.git
synced 2025-12-25 04:45:56 +00:00
fix some minor errors reported by clang's "scan-build" tool
This commit is contained in:
@@ -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 );
|
||||
|
||||
Reference in New Issue
Block a user