From cd6ff1211ff75d462b6c9742089a5d7924484fc5 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Sat, 7 Nov 2009 02:03:12 +0000 Subject: [PATCH] (trunk gtk) fix a couple of build errors on older versions of GTK+ --- gtk/my-valgrind.sh | 2 +- gtk/tr-core.c | 20 ++++++++++---------- gtk/tr-prefs.c | 3 --- 3 files changed, 11 insertions(+), 14 deletions(-) diff --git a/gtk/my-valgrind.sh b/gtk/my-valgrind.sh index 26608630c..7c6d9b340 100755 --- a/gtk/my-valgrind.sh +++ b/gtk/my-valgrind.sh @@ -2,4 +2,4 @@ export G_SLICE=always-malloc export G_DEBUG=gc-friendly export GLIBCXX_FORCE_NEW=1 -valgrind --tool=memcheck --leak-check=full --leak-resolution=high --num-callers=64 --log-file=x-valgrind --show-reachable=yes ./transmission -g /tmp/crash +valgrind --tool=memcheck --leak-check=full --leak-resolution=high --num-callers=48 --log-file=x-valgrind --show-reachable=yes ./transmission -g /tmp/test diff --git a/gtk/tr-core.c b/gtk/tr-core.c index 941eb9e88..504052018 100644 --- a/gtk/tr-core.c +++ b/gtk/tr-core.c @@ -458,6 +458,16 @@ tr_core_apply_defaults( tr_ctor * ctor ) } } +static int +tr_strcmp( const void * a, + const void * b ) +{ + if( a && b ) return strcmp( a, b ); + if( a ) return 1; + if( b ) return -1; + return 0; +} + #ifdef HAVE_GIO struct watchdir_file @@ -597,16 +607,6 @@ scanWatchDir( TrCore * core ) } } -static int -tr_strcmp( const void * a, - const void * b ) -{ - if( a && b ) return strcmp( a, b ); - if( a ) return 1; - if( b ) return -1; - return 0; -} - static void updateWatchDir( TrCore * core ) { diff --git a/gtk/tr-prefs.c b/gtk/tr-prefs.c index f3265597c..baa112063 100644 --- a/gtk/tr-prefs.c +++ b/gtk/tr-prefs.c @@ -272,10 +272,7 @@ torrentPage( GObject * core ) GtkWidget * t; GtkWidget * w; GtkWidget * w2; - -#ifdef HAVE_GIO GtkWidget * l; -#endif t = hig_workarea_create( ); hig_workarea_add_section_title( t, &row, _( "Adding Torrents" ) );