Fix a ton of warnings with a simple three line change
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@559 4a71c877-e1ca-e34f-864e-861f7616d084master
parent
65175a10ca
commit
302967bd69
|
@ -212,7 +212,7 @@ static inline void endian_udword(UDWORD *udword) {
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void endian_sdword(UDWORD *sdword) {
|
static inline void endian_sdword(SDWORD *sdword) {
|
||||||
#ifdef __BIG_ENDIAN__
|
#ifdef __BIG_ENDIAN__
|
||||||
UBYTE tmp, *ptr;
|
UBYTE tmp, *ptr;
|
||||||
|
|
||||||
|
|
|
@ -61,7 +61,7 @@ void memDisplayTreap(STRING *pFileName);
|
||||||
#ifdef DEBUG_MALLOC
|
#ifdef DEBUG_MALLOC
|
||||||
|
|
||||||
#define MALLOC(size) memMalloc(__FILE__, __LINE__, size)
|
#define MALLOC(size) memMalloc(__FILE__, __LINE__, size)
|
||||||
#define FREE(ptr) { void** p = &(ptr); memFree(__FILE__, __LINE__, *p); *p = NULL; }
|
#define FREE(ptr) do { memFree(__FILE__, __LINE__, ptr); ptr = NULL; } while(0)
|
||||||
#ifndef NO_PTRVALID
|
#ifndef NO_PTRVALID
|
||||||
#define PTRVALID(ptr, size) memPointerValid(ptr, size)
|
#define PTRVALID(ptr, size) memPointerValid(ptr, size)
|
||||||
#else
|
#else
|
||||||
|
@ -73,7 +73,7 @@ void memDisplayTreap(STRING *pFileName);
|
||||||
#else // !DEBUG_MALLOC
|
#else // !DEBUG_MALLOC
|
||||||
|
|
||||||
#define MALLOC(size) memMallocRelease(size)
|
#define MALLOC(size) memMallocRelease(size)
|
||||||
#define FREE(ptr) { void** p = (void**)&(ptr); memFreeRelease(*p); *p = NULL; }
|
#define FREE(ptr) do { memFreeRelease(ptr); ptr = NULL; } while(0)
|
||||||
#define PTRVALID(ptr, size) (TRUE)
|
#define PTRVALID(ptr, size) (TRUE)
|
||||||
#define MEMORYREPORT(file)
|
#define MEMORYREPORT(file)
|
||||||
#define MEMORYTREAP(file) memDisplayTreap(file)
|
#define MEMORYTREAP(file) memDisplayTreap(file)
|
||||||
|
|
Loading…
Reference in New Issue