From 1aaef6ce88426ce3258ac7de2008b71d51617b22 Mon Sep 17 00:00:00 2001 From: Joel Dice Date: Tue, 23 Jun 2015 14:07:48 -0600 Subject: [PATCH] fix GCC 5.1 compiler warnings/errors GCC is a lot more sensitive about -Werror=unused-variable, to the point that stuff declared in header files but unused in a given compilation unit is flagged. This may be due to the way we're here's the fix. --- src/bootimage-template.cpp | 5 +---- src/codegen/compiler/event.cpp | 4 ++-- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/bootimage-template.cpp b/src/bootimage-template.cpp index e8f080cfb2..16dd85e11e 100644 --- a/src/bootimage-template.cpp +++ b/src/bootimage-template.cpp @@ -1,10 +1,7 @@ const unsigned NAME(BootMask) = (~static_cast(0)) / NAME(BytesPerWord); -const unsigned NAME(BootShift) = 32 - avian::util::log(NAME(BytesPerWord)); - -const unsigned NAME(BootFlatConstant) = 1 << NAME(BootShift); -const unsigned NAME(BootHeapOffset) = 1 << (NAME(BootShift) + 1); +const unsigned NAME(BootShift) UNUSED = 32 - avian::util::log(NAME(BytesPerWord)); inline unsigned LABEL(codeMapSize)(unsigned codeSize) { diff --git a/src/codegen/compiler/event.cpp b/src/codegen/compiler/event.cpp index 49c406c08e..575bede6ac 100644 --- a/src/codegen/compiler/event.cpp +++ b/src/codegen/compiler/event.cpp @@ -1111,10 +1111,10 @@ class CombineEvent : public Event { "%p %p %d : %p %p %d\n", secondValue, secondValue->source, - secondValue->source->type(c), + static_cast(secondValue->source->type(c)), secondValue->nextWord, secondValue->nextWord->source, - secondValue->nextWord->source->type(c)); + static_cast(secondValue->nextWord->source->type(c))); } }