Ignore:
Timestamp:
Jan 23, 2009, 6:44:15 PM (13 years ago)
Author:
charles
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/bencode-test.c

    r7552 r7783  
    1111#include "utils.h" /* tr_free */
    1212
    13 #define VERBOSE 0
     13#undef VERBOSE
    1414
    1515static int test = 0;
    1616
    17 #define check( A ) \
     17#ifdef VERBOSE
     18  #define check( A ) \
    1819    { \
    1920        ++test; \
    2021        if( A ){ \
    21             if( VERBOSE ) \
    22                 fprintf( stderr, "PASS test #%d (%s, %d)\n", test, __FILE__,\
    23                          __LINE__ );\
     22            fprintf( stderr, "PASS test #%d (%s, %d)\n", test, __FILE__, __LINE__ ); \
    2423        } else { \
    25             fprintf( stderr, "FAIL test #%d (%s, %d)\n", test, __FILE__,\
    26                      __LINE__ ); \
     24            fprintf( stderr, "FAIL test #%d (%s, %d)\n", test, __FILE__, __LINE__ ); \
    2725            return test; \
    2826        } \
    2927    }
     28#else
     29  #define check( A ) \
     30    { \
     31        ++test; \
     32        if( !( A ) ){ \
     33            fprintf( stderr, "FAIL test #%d (%s, %d)\n", test, __FILE__, __LINE__ ); \
     34            return test; \
     35        } \
     36    }
     37#endif
    3038
    3139static int
Note: See TracChangeset for help on using the changeset viewer.