(trunk libT) fix some code that the newly-added gcc warnings didn't like

This commit is contained in:
Charles Kerr
2009-01-23 18:44:15 +00:00
parent 0e072e7c25
commit 13c22f88ff
12 changed files with 147 additions and 82 deletions

View File

@@ -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"