- Timestamp:
- 08/22/11 10:54:56 (13 years ago)
- Location:
- ps/trunk/source/lib
- Files:
-
- 1 added
- 4 edited
-
allocators/arena.cpp (added)
-
allocators/arena.h (modified) (1 diff)
-
allocators/pool.h (modified) (1 diff)
-
code_annotation.h (modified) (2 diffs)
-
sysdep/os/win/wsdl.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
ps/trunk/source/lib/allocators/arena.h
r10051 r10059 43 43 class Arena 44 44 { 45 NONCOPYABLE(Arena); 45 46 public: 46 47 Arena(size_t maxSize) -
ps/trunk/source/lib/allocators/pool.h
r10052 r10059 44 44 class Pool 45 45 { 46 NONCOPYABLE(Pool); 46 47 public: 47 48 // (must round up because freelist stores pointers inside objects) -
ps/trunk/source/lib/code_annotation.h
r9423 r10059 32 32 33 33 /** 34 * mark a function local variable or parameter as unused and avoid35 * the corresponding compiler warning.36 * use inside the function body, e.g. void f(int x) { UNUSED2(x); }37 **/38 #if ICC_VERSION39 // NB: #pragma unused is documented but "unrecognized" when used;40 // casting to void isn't sufficient, but the following is:41 # define UNUSED2(param) param = param42 #else43 # define UNUSED2(param) (void)param44 #endif45 46 /**47 34 * mark a function parameter as unused and avoid 48 35 * the corresponding compiler warning. … … 50 37 **/ 51 38 #define UNUSED(param) 39 40 /** 41 * mark a function local variable or parameter as unused and avoid 42 * the corresponding compiler warning. 43 * note that UNUSED is not applicable to variable definitions that 44 * involve initialization, nor is it sufficient in cases where 45 * an argument is unused only in certain situations. 46 * example: void f(int x) { ASSERT(x == 0); UNUSED2(x); } 47 * this asserts in debug builds and avoids warnings in release. 48 **/ 49 #if HAVE_C99 && GCC_VERSION // _Pragma from C99, unused from GCC 50 # define UNUSED2(param) _Pragma("unused " #param) 51 #elif ICC_VERSION 52 // ICC 12 still doesn't recognize pragma unused, casting to void 53 // isn't sufficient, and self-assignment doesn't work for references. 54 # define UNUSED2(param) do{ if(¶m) {} } while(false) 55 #else 56 # define UNUSED2(param) ((void)(param)) 57 #endif 52 58 53 59 -
ps/trunk/source/lib/sysdep/os/win/wsdl.cpp
r9423 r10059 1497 1497 // that means stdout isn't associated with a lowio handle; _close is 1498 1498 // called with fd = -1. oh well, there's nothing we can do. 1499 FILE* f = 0; 1500 errno_t ret = _wfreopen_s(&f, OsString(pathname).c_str(), L"wt", stdout); 1501 // (ignore return value - it might indicate 'file already exists' even 1502 // if f is valid, which is what actually counts) 1503 UNUSED2(ret); 1499 FILE* f = 0; 1500 // ignore return value - it might indicate 'file already exists' even 1501 // if f is valid, which is what actually counts. 1502 (void)_wfreopen_s(&f, OsString(pathname).c_str(), L"wt", stdout); 1504 1503 if(GetLastError() == ERROR_ALREADY_EXISTS) 1505 1504 SetLastError(0);
Note:
See TracChangeset
for help on using the changeset viewer.
