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

    r7234 r7783  
    55#include "utils.h"
    66
    7 #define VERBOSE 0
     7#undef VERBOSE
    88
    9 #define check( A ) \
     9#ifdef VERBOSE
     10  #define check( A ) \
    1011    { \
    1112        ++test; \
    1213        if( A ){ \
    13             if( VERBOSE ) \
    14                 fprintf( stderr, "PASS test #%d (%s, %d)\n", test, __FILE__,\
    15                          __LINE__ );\
     14            fprintf( stderr, "PASS test #%d (%s, %d)\n", test, __FILE__, __LINE__ ); \
    1615        } else { \
    17             if( VERBOSE ) \
    18                 fprintf( stderr, "FAIL test #%d (%s, %d)\n", test, __FILE__,\
    19                          __LINE__ );\
     16            fprintf( stderr, "FAIL test #%d (%s, %d)\n", test, __FILE__, __LINE__ ); \
    2017            return test; \
    2118        } \
    2219    }
     20#else
     21  #define check( A ) \
     22    { \
     23        ++test; \
     24        if( !( A ) ){ \
     25            fprintf( stderr, "FAIL test #%d (%s, %d)\n", test, __FILE__, __LINE__ ); \
     26            return test; \
     27        } \
     28    }
     29#endif
    2330
    2431int
Note: See TracChangeset for help on using the changeset viewer.