Changeset 159

Show
Ignore:
Timestamp:
03/13/09 16:44:02 (15 years ago)
Author:
bhilburn
Message:

Fixed a potential bug that would have occured if parenthesis were not included
around conditional ERRORs, LOGs, etc.

Location:
vtcross/branches/bhilburn/src/include/vtcross
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • vtcross/branches/bhilburn/src/include/vtcross/debug.h

    r146 r159  
    1616 
    1717#define DEBUG(...) \ 
    18     if(VTCROSS_DEBUG) \ 
    19         fprintf(stderr, __VA_ARGS__); 
     18    if(VTCROSS_DEBUG) {\ 
     19        fprintf(stderr, __VA_ARGS__);\ 
     20    } 
    2021 
    21 #define LOG(...) \ 
    22     fprintf(stdout, __VA_ARGS__); 
     22#define LOG(...) fprintf(stdout, __VA_ARGS__) 
    2323 
    2424#endif 
  • vtcross/branches/bhilburn/src/include/vtcross/error.h

    r148 r159  
    1313#include <cstdio> 
    1414 
    15 #define ERROR(exit_code, ...) \ 
     15#define ERROR(exit_code, ...) { \ 
    1616    fprintf(stderr, __VA_ARGS__); \ 
    17     exit(exit_code); 
     17    exit(exit_code); } 
    1818 
    19 #define WARNING(...) \ 
    20     fprintf(stderr, __VA_ARGS__); 
     19#define WARNING(...) fprintf(stderr, __VA_ARGS__) 
    2120 
    2221#endif