From 6b1f1eba9d86d586a29957a74261bcfe52963d88 Mon Sep 17 00:00:00 2001 From: Horst Schirmeier Date: Sun, 27 Apr 2014 19:00:02 +0200 Subject: [PATCH] compiler warning fixes The fix for tools/convert-trace/Gem5Converter.cc repairs a real issue which caused a runtime warning to never be displayed. Change-Id: I5d94acdbffc99d5f2a78f047062c011c6f8ab4e3 --- src/core/sal/bochs/CompressState.ah | 2 +- tools/convert-trace/Gem5Converter.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/sal/bochs/CompressState.ah b/src/core/sal/bochs/CompressState.ah index fea61576..01c46f7e 100644 --- a/src/core/sal/bochs/CompressState.ah +++ b/src/core/sal/bochs/CompressState.ah @@ -74,7 +74,7 @@ aspect CompressState { } while (remaining); gzclose(f); - return (cbuf - (char *)ptr) / size; + return (cbuf - (const char *)ptr) / size; } }; diff --git a/tools/convert-trace/Gem5Converter.cc b/tools/convert-trace/Gem5Converter.cc index 0a4e16f7..b5e804c9 100644 --- a/tools/convert-trace/Gem5Converter.cc +++ b/tools/convert-trace/Gem5Converter.cc @@ -43,7 +43,7 @@ bool Gem5Converter::convert() >> dummy >> dummy >> dec >> access_width >> dummy >> dummy >> hex >> access_address; if (!ss) { - if (ifetch_seen && !access_type.c_str()[0] == '0') { + if (ifetch_seen && access_type.c_str()[0] != '0') { LOG << "input mismatch, input = " << buf << endl; } continue;