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/request-list-test.c

    r7615 r7783  
    33#include "request-list.h"
    44
    5 #define VERBOSE 0
     5#undef VERBOSE
    66
    77static int test = 0;
    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             fprintf( stderr, "FAIL test #%d (%s, %d)\n", test, __FILE__,\
    18                      __LINE__ ); \
     16            fprintf( stderr, "FAIL test #%d (%s, %d)\n", test, __FILE__, __LINE__ ); \
    1917            return test; \
    2018        } \
    2119    }
     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
    2230
    2331static int
Note: See TracChangeset for help on using the changeset viewer.