summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrea Mondelli <Andrea.Mondelli@ucf.edu>2019-03-15 17:00:20 -0400
committerAndrea Mondelli <Andrea.Mondelli@ucf.edu>2019-03-18 17:56:09 +0000
commit0996afe2049e67d449557815af949caa79159e2e (patch)
tree7f7833677a3f89d774a0e38e5578f183e16c5973 /src
parentfe3e8084959a6910f4c8d075c5c03e40d0269527 (diff)
downloadgem5-0996afe2049e67d449557815af949caa79159e2e.tar.xz
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>
Diffstat (limited to 'src')
-rw-r--r--src/mem/cache/prefetch/indirect_memory.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mem/cache/prefetch/indirect_memory.cc b/src/mem/cache/prefetch/indirect_memory.cc
index 41edfe0ab..393958c57 100644
--- a/src/mem/cache/prefetch/indirect_memory.cc
+++ b/src/mem/cache/prefetch/indirect_memory.cc
@@ -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