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

    r6944 r7783  
    66#include "utils.h"
    77
    8 #define VERBOSE 0
     8#undef VERBOSE
    99
    1010static int test = 0;
    1111
    12 #define check( A ) \
     12#ifdef VERBOSE
     13  #define check( A ) \
    1314    { \
    1415        ++test; \
    1516        if( A ){ \
    16             if( VERBOSE ) \
    17                 fprintf( stderr, "PASS test #%d (%s, %d)\n", test, __FILE__,\
    18                          __LINE__ );\
     17            fprintf( stderr, "PASS test #%d (%s, %d)\n", test, __FILE__, __LINE__ ); \
    1918        } else { \
    20             if( VERBOSE ) \
    21                 fprintf( stderr, "FAIL test #%d (%s, %d)\n", test, __FILE__,\
    22                          __LINE__ );\
     19            fprintf( stderr, "FAIL test #%d (%s, %d)\n", test, __FILE__, __LINE__ ); \
    2320            return test; \
    2421        } \
    2522    }
     23#else
     24  #define check( A ) \
     25    { \
     26        ++test; \
     27        if( !( A ) ){ \
     28            fprintf( stderr, "FAIL test #%d (%s, %d)\n", test, __FILE__, __LINE__ ); \
     29            return test; \
     30        } \
     31    }
     32#endif
    2633
    2734static int
Note: See TracChangeset for help on using the changeset viewer.