[PATCH] Eliminate warnings from MIN/MAX macros
Brad <[email protected]> Thu, 29 Dec 2011 10:18:28 -0500
| Newsgroups | gmane.comp.video.xvid.devel |
|---|---|
| Message-ID | <[email protected]> |
Only include the MIN/MAX macros unconditionally to eliminate warnings for operating systems which already provide MIN/MAX macros. Index: src/global.h =================================================================== --- src/global.h (revision 2056) +++ src/global.h (working copy) @@ -251,8 +251,12 @@ /* useful macros */ +#ifndef MIN #define MIN(X, Y) ((X)<(Y)?(X):(Y)) +#endif +#ifndef MAX #define MAX(X, Y) ((X)>(Y)?(X):(Y)) +#endif /* #define ABS(X) (((X)>0)?(X):-(X)) */ #define SIGN(X) (((X)>0)?1:-1) #define CLIP(X,AMIN,AMAX) (((X)<(AMIN)) ? (AMIN) : ((X)>(AMAX)) ? (AMAX) : (X)) -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.