From c4b85d5f9854abeee6d1dbe15ae65a7a1aada6b2 Mon Sep 17 00:00:00 2001 From: Andreas Sandberg Date: Thu, 18 May 2017 15:11:23 +0100 Subject: base, sim, arch: Fix clang 5.0 warnings Compiling gem5 with recent version of clang (4 and 5) triggers warnings that are treated as errors: * Global templatized static functions result in a warning if they are not used. These should either be declared as static inline or without the static identifier to avoid the warning. * Some templatized classes contain static variables. The instantiated versions of these variables / templates need to be explicitly declared to avoid a compiler warning. Change-Id: Ie8261144836e94ebab7ea04ccccb90927672c257 Signed-off-by: Andreas Sandberg Reviewed-by: Curtis Dunham Reviewed-on: https://gem5-review.googlesource.com/3420 Reviewed-by: Jason Lowe-Power --- src/sim/syscall_emul.hh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/sim') diff --git a/src/sim/syscall_emul.hh b/src/sim/syscall_emul.hh index 53c053f05..7efd7c7e6 100644 --- a/src/sim/syscall_emul.hh +++ b/src/sim/syscall_emul.hh @@ -429,7 +429,7 @@ getElapsedTimeNano(T1 &sec, T2 &nsec) //// memory space. Used by stat(), fstat(), and lstat(). template -static void +void convertStatBuf(target_stat &tgt, host_stat *host, bool fakeTTY = false) { using namespace TheISA; @@ -478,7 +478,7 @@ convertStatBuf(target_stat &tgt, host_stat *host, bool fakeTTY = false) // Same for stat64 template -static void +void convertStat64Buf(target_stat &tgt, host_stat64 *host, bool fakeTTY = false) { using namespace TheISA; @@ -500,7 +500,7 @@ convertStat64Buf(target_stat &tgt, host_stat64 *host, bool fakeTTY = false) // Here are a couple of convenience functions template -static void +void copyOutStatBuf(SETranslatingPortProxy &mem, Addr addr, hst_stat *host, bool fakeTTY = false) { @@ -511,7 +511,7 @@ copyOutStatBuf(SETranslatingPortProxy &mem, Addr addr, } template -static void +void copyOutStat64Buf(SETranslatingPortProxy &mem, Addr addr, hst_stat64 *host, bool fakeTTY = false) { @@ -522,7 +522,7 @@ copyOutStat64Buf(SETranslatingPortProxy &mem, Addr addr, } template -static void +void copyOutStatfsBuf(SETranslatingPortProxy &mem, Addr addr, hst_statfs *host) { -- cgit v1.2.3