mem-cache: tautological comparison of byteOrder
authorAndrea Mondelli <Andrea.Mondelli@ucf.edu>
Fri, 15 Mar 2019 21:00:20 +0000 (17:00 -0400)
committerAndrea Mondelli <Andrea.Mondelli@ucf.edu>
Mon, 18 Mar 2019 17:56:09 +0000 (17:56 +0000)
commit0996afe2049e67d449557815af949caa79159e2e
tree7f7833677a3f89d774a0e38e5578f183e16c5973
parentfe3e8084959a6910f4c8d075c5c03e40d0269527
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>
src/mem/cache/prefetch/indirect_memory.cc