]> granicus.if.org Git - transmission/commitdiff
(trunk) silence some minor gcc warnings
authorCharles Kerr <charles@transmissionbt.com>
Tue, 23 Jun 2009 14:15:23 +0000 (14:15 +0000)
committerCharles Kerr <charles@transmissionbt.com>
Tue, 23 Jun 2009 14:15:23 +0000 (14:15 +0000)
12 files changed:
configure.ac
gtk/details.c
gtk/main.c
gtk/tr-core.c
gtk/tr-prefs.c
gtk/util.c
libtransmission/bencode.c
libtransmission/fastresume.c
libtransmission/port-forwarding.c
libtransmission/rpc-server.c
libtransmission/upnp.c
libtransmission/verify.c

index de029ef78ddccf16c877ad1bdd060389e41b9e3e..cd55c1aa41368971d2ecd827dd6e3a23a4285e8c 100644 (file)
@@ -298,6 +298,10 @@ if test "x$build_gtk" = "xyes" -a  "x$enable_nls" = "xno" ; then
     AC_MSG_ERROR("The gtk client cannot be built without nls support.  Try adding either --enable-nls or --disable-gtk" )
 fi
 
+dnl This section is only used for internationalization.
+dnl If you don't need translations and this section gives you trouble --
+dnl such as if you're building for a headless system --
+dnl it's okay to tear this section out and re-build the configure script.
 use_nls=no
 if test "x$enable_nls" = "xyes" ; then
     use_nls=yes
index a9a634e8670fba50d156d3b7fda0477b6dd3c7b1..8d5d1f29243b59d0c68d19702be8d986fa76aae5 100644 (file)
@@ -499,7 +499,7 @@ options_page_new( struct DetailsImpl * d )
 {
     guint tag;
     int row;
-    char *s;
+    const char *s;
     GSList *group;
     GtkWidget *t, *w, *tb, *h;
 
index d330d0c067ebdc9b20740c07ba4adebb33ac3592..c4650f2c76bad09c9c0635f3a5508324f2438f32 100644 (file)
@@ -370,7 +370,7 @@ main( int     argc,
         g_thread_init( NULL );
 
     gerr = NULL;
-    if( !gtk_init_with_args( &argc, &argv, _( "[torrent files]" ), entries,
+    if( !gtk_init_with_args( &argc, &argv, (char*)_( "[torrent files]" ), entries,
                              (char*)domain, &gerr ) )
     {
         fprintf( stderr, "%s\n", gerr->message );
index 5b72152fbfa99648b1faa6e354592b7c5574afd2..9befb91ba412f026de3fe19b5d586c399e8427b0 100644 (file)
@@ -1163,11 +1163,10 @@ gtr_inhibit_hibernation( guint * cookie )
                                      G_TYPE_UINT, cookie,
                                      G_TYPE_INVALID );
         if( success )
-            tr_inf( _( "Disallowing desktop hibernation" ) );
+            tr_inf( "%s", _( "Disallowing desktop hibernation" ) );
         else
         {
-            tr_err( _(
-                        "Couldn't disable desktop hibernation: %s" ),
+            tr_err( _( "Couldn't disable desktop hibernation: %s" ),
                     error->message );
             g_error_free( error );
         }
@@ -1191,7 +1190,7 @@ gtr_uninhibit_hibernation( guint inhibit_cookie )
                                               G_TYPE_INVALID,
                                               G_TYPE_INVALID );
         if( success )
-            tr_inf( _( "Allowing desktop hibernation" ) );
+            tr_inf( "%s", _( "Allowing desktop hibernation" ) );
         else
         {
             g_warning( "Couldn't uninhibit the system from suspending: %s.",
index 5b8378ad5fdfb7e59675b0e5ebf60218807a1365..9161ec10be946be9d4a11ce4805528f68c8a473e 100644 (file)
@@ -418,9 +418,9 @@ onBlocklistUpdate( GtkButton * w, gpointer gdata )
                                 GTK_DIALOG_DESTROY_WITH_PARENT,
                                 GTK_MESSAGE_INFO,
                                 GTK_BUTTONS_CLOSE,
-                               _( "Update Blocklist" ) );
+                                "%s", _( "Update Blocklist" ) );
     gtk_widget_set_sensitive( data->updateBlocklistButton, FALSE );
-    gtk_message_dialog_format_secondary_text( GTK_MESSAGE_DIALOG( d ), _( "Getting new blocklist..." ) );
+    gtk_message_dialog_format_secondary_text( GTK_MESSAGE_DIALOG( d ), "%s", _( "Getting new blocklist..." ) );
     data->updateBlocklistDialog = d;
     g_signal_connect( d, "response", G_CALLBACK(onBlocklistUpdateResponse), data );
     gtk_widget_show( d );
index f39c961474c486c7dcfe29e0927e08d472e51a47..d8712ab3d93193f5a5b84555efe15fdd46d39171 100644 (file)
@@ -393,7 +393,7 @@ addTorrentErrorDialog( GtkWidget *  child,
                                GTK_DIALOG_DESTROY_WITH_PARENT,
                                GTK_MESSAGE_ERROR,
                                GTK_BUTTONS_CLOSE,
-                               _( "Error opening torrent" ) );
+                               "%s", _( "Error opening torrent" ) );
     gtk_message_dialog_format_secondary_text( GTK_MESSAGE_DIALOG( w ),
                                               "%s", secondary );
     g_signal_connect_swapped( w, "response",
index aa433b03dbe5e711ca6765c1a0af1c7abd2d97c9..edcab98bff3c9a7efc79c6880dd18092d996e8f5 100644 (file)
@@ -1055,7 +1055,7 @@ bencWalk( const tr_benc          * top,
 
                 default:
                     /* did caller give us an uninitialized val? */
-                    tr_err( _( "Invalid metadata" ) );
+                    tr_err( "%s", _( "Invalid metadata" ) );
                     break;
             }
     }
index 41324e4a9b165900090c6ea33d180f0d91e713ac..1a434ffba8083bbbc8de3bd5cde49c639e752844 100644 (file)
@@ -550,7 +550,7 @@ fastResumeLoadImpl( tr_torrent * tor,
 
     if( !buf )
         /* %s is the torrent name */
-        tr_torinf( tor, _( "Couldn't read resume file" ) );
+        tr_torinf( tor, "%s", _( "Couldn't read resume file" ) );
     else
     {
         const uint8_t * walk = buf;
@@ -563,7 +563,7 @@ fastResumeLoadImpl( tr_torrent * tor,
                 ret |= parseVersion1 ( tor, walk, end, fieldsToLoad );
             else
                 /* %s is the torrent name */
-                tr_torinf( tor, _( "Couldn't read resume file" ) );
+                tr_torinf( tor, "%s", _( "Couldn't read resume file" ) );
         }
 
         tr_free( buf );
index 86c838505afeae11ef741d68c1e12e9842b0229d..95046a74d12626fdbf37e3a8fed205c879a6da7d 100644 (file)
@@ -163,7 +163,7 @@ stop_timer( tr_shared * s )
 static void
 stop_forwarding( tr_shared * s )
 {
-    tr_ninf( getKey( ), _( "Stopped" ) );
+    tr_ninf( getKey( ), "%s", _( "Stopped" ) );
     natPulse( s, FALSE );
     tr_natpmpClose( s->natpmp );
     s->natpmp = NULL;
index 094e52c69ad6693f1b8ad5ca69517ab71f23ebbf..89d584ffd4ba169197755b746d62745929eb20b8 100644 (file)
@@ -945,10 +945,10 @@ tr_rpcInit( tr_session  * session,
         tr_runInEventThread( session, startServer, s );
 
         if( s->isWhitelistEnabled )
-            tr_ninf( MY_NAME, _( "Whitelist enabled" ) );
+            tr_ninf( MY_NAME, "%s", _( "Whitelist enabled" ) );
 
         if( s->isPasswordEnabled )
-            tr_ninf( MY_NAME, _( "Password required" ) );
+            tr_ninf( MY_NAME, "%s", _( "Password required" ) );
     }
 
     return s;
index 72ce3d02cba6f1b4fbed1b5129dcf08a7f154c21..4e4a07243f6f42778775f357c7b9aad7171d0958 100644 (file)
@@ -194,7 +194,7 @@ tr_upnpPulse( tr_upnp * handle,
                  handle->lanaddr, port );
         if( handle->isMapped )
         {
-            tr_ninf( getKey( ), _( "Port forwarding successful!" ) );
+            tr_ninf( getKey( ), "%s", _( "Port forwarding successful!" ) );
             handle->port = port;
             handle->state = TR_UPNP_IDLE;
         }
index f9b75c898068bd6fc5b2bf72e996656834b2c1fe..9cab00218c2a13c348fa27a72469815c1a98e422 100644 (file)
@@ -209,7 +209,7 @@ verifyThreadFunc( void * unused UNUSED )
         tr_free( node );
         tr_lockUnlock( getVerifyLock( ) );
 
-        tr_torinf( tor, _( "Verifying torrent" ) );
+        tr_torinf( tor, "%s", _( "Verifying torrent" ) );
         tr_torrentSetVerifyState( tor, TR_VERIFY_NOW );
         changed = verifyTorrent( tor, &stopCurrent );
         tr_torrentSetVerifyState( tor, TR_VERIFY_NONE );
@@ -244,7 +244,7 @@ tr_verifyAdd( tr_torrent *      tor,
     {
         struct verify_node * node;
 
-        tr_torinf( tor, _( "Queued for verification" ) );
+        tr_torinf( tor, "%s", _( "Queued for verification" ) );
 
         node = tr_new( struct verify_node, 1 );
         node->torrent = tor;