mirror of
https://github.com/transmission/transmission.git
synced 2025-12-24 20:35:36 +00:00
(trunk libT) fix some code that the newly-added gcc warnings didn't like
This commit is contained in:
@@ -5,23 +5,31 @@
|
||||
#include "json.h"
|
||||
#include "utils.h" /* tr_free */
|
||||
|
||||
#define VERBOSE 0
|
||||
#undef VERBOSE
|
||||
|
||||
static int test = 0;
|
||||
|
||||
#define check( A ) \
|
||||
#ifdef VERBOSE
|
||||
#define check( A ) \
|
||||
{ \
|
||||
++test; \
|
||||
if( A ){ \
|
||||
if( VERBOSE ) \
|
||||
fprintf( stderr, "PASS test #%d (%s, %d)\n", test, __FILE__,\
|
||||
__LINE__ );\
|
||||
fprintf( stderr, "PASS test #%d (%s, %d)\n", test, __FILE__, __LINE__ ); \
|
||||
} else { \
|
||||
fprintf( stderr, "FAIL test #%d (%s, %d)\n", test, __FILE__,\
|
||||
__LINE__ ); \
|
||||
fprintf( stderr, "FAIL test #%d (%s, %d)\n", test, __FILE__, __LINE__ ); \
|
||||
return test; \
|
||||
} \
|
||||
}
|
||||
#else
|
||||
#define check( A ) \
|
||||
{ \
|
||||
++test; \
|
||||
if( !( A ) ){ \
|
||||
fprintf( stderr, "FAIL test #%d (%s, %d)\n", test, __FILE__, __LINE__ ); \
|
||||
return test; \
|
||||
} \
|
||||
}
|
||||
#endif
|
||||
|
||||
#include "ConvertUTF.h"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user