mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-15 13:01:45 +08:00
Add UNUSED_VARIABLE helper macro
Change-Id: If293ad33899ee4feb79424c351b13ea85306c603 Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
This commit is contained in:

committed by
sys_ocldev

parent
280b66fb97
commit
487c4c6e4b
@ -28,6 +28,8 @@
|
||||
#endif // _DEBUG
|
||||
#endif // !DEBUG_BREAK_IF
|
||||
|
||||
#define UNUSED_VARIABLE(x) ((void)(x))
|
||||
|
||||
namespace NEO {
|
||||
void debugBreak(int line, const char *file);
|
||||
[[noreturn]] void abortUnrecoverable(int line, const char *file);
|
||||
|
@ -37,7 +37,7 @@ std::unique_ptr<char[]> loadDataFromFile(
|
||||
memset(ret.get(), 0x00, nsize + 1);
|
||||
auto read = fread(ret.get(), sizeof(unsigned char), nsize, fp);
|
||||
DEBUG_BREAK_IF(read != nsize);
|
||||
((void)(read));
|
||||
UNUSED_VARIABLE(read);
|
||||
} else {
|
||||
nsize = 0;
|
||||
}
|
||||
|
@ -30,7 +30,7 @@ class RefCounter {
|
||||
void inc() {
|
||||
CT curr = ++val;
|
||||
DEBUG_BREAK_IF(curr < 1);
|
||||
((void)(curr));
|
||||
UNUSED_VARIABLE(curr);
|
||||
}
|
||||
|
||||
bool dec() {
|
||||
|
Reference in New Issue
Block a user