mem-cache: tautological comparison of byteOrder
Error:
build/X86/mem/cache/prefetch/indirect_memory.cc:56:24:
error: result of comparison of constant -1 with expression
of type 'const ByteOrder' is always false
[-Werror,-Wtautological-constant-out-of-range-compare]
fatal_if(byteOrder == -1, "This prefetcher requires a defined ISA\n");
~~~~~~~~~ ^ ~~
build/X86/base/logging.hh:205:14: note: expanded from macro 'fatal_if'
if ((cond)) { \
^~~~
1 error generated.
Fix:
cast of constant (-1) used in comparison
Change-Id: I3deb154c2fe5b92c4ddf499176cb185c4ec7cf64
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/17388
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com>
This commit is contained in:
3
src/mem/cache/prefetch/indirect_memory.cc
vendored
3
src/mem/cache/prefetch/indirect_memory.cc
vendored
@@ -53,7 +53,8 @@ IndirectMemoryPrefetcher::IndirectMemoryPrefetcher(
|
||||
byteOrder((ByteOrder) -1)
|
||||
#endif
|
||||
{
|
||||
fatal_if(byteOrder == -1, "This prefetcher requires a defined ISA\n");
|
||||
fatal_if(byteOrder == static_cast<ByteOrder>(-1),
|
||||
"This prefetcher requires a defined ISA\n");
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
Reference in New Issue
Block a user