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/test-peer-id.c

    r7476 r7783  
    66#include "utils.h"
    77
    8 #define VERBOSE 0
     8#undef VERBOSE
    99
    10 #define check( A ) \
     10#ifdef VERBOSE
     11  #define check( A ) \
    1112    { \
    1213        ++test; \
    1314        if( A ){ \
    14             if( VERBOSE ) \
    15                 fprintf( stderr, "PASS test #%d (%s, %d)\n", test, __FILE__,\
    16                          __LINE__ );\
     15            fprintf( stderr, "PASS test #%d (%s, %d)\n", test, __FILE__, __LINE__ ); \
    1716        } else { \
    18             if( VERBOSE ) \
    19                 fprintf( stderr, "FAIL test #%d (%s, %d)\n", test, __FILE__,\
    20                          __LINE__ );\
     17            fprintf( stderr, "FAIL test #%d (%s, %d)\n", test, __FILE__, __LINE__ ); \
    2118            return test; \
    2219        } \
    2320    }
     21#else
     22  #define check( A ) \
     23    { \
     24        ++test; \
     25        if( !( A ) ){ \
     26            fprintf( stderr, "FAIL test #%d (%s, %d)\n", test, __FILE__, __LINE__ ); \
     27            return test; \
     28        } \
     29    }
     30#endif
    2431
    2532int
Note: See TracChangeset for help on using the changeset viewer.