From f8b6f8cbb252054404b2716960972669f4047a9f Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 30 Apr 2016 17:28:37 +0300 Subject: Fix some clang issues. --- src/utils/checkutils.cpp | 2 +- src/utils/physfstools.cpp | 2 +- src/utils/process.cpp | 3 +++ 3 files changed, 5 insertions(+), 2 deletions(-) (limited to 'src/utils') diff --git a/src/utils/checkutils.cpp b/src/utils/checkutils.cpp index 8f3e5c337..20c22df46 100644 --- a/src/utils/checkutils.cpp +++ b/src/utils/checkutils.cpp @@ -73,7 +73,7 @@ void reportStack(const char *const file, text, func); #if defined __linux__ || defined __linux - size = (int)backtrace(array, 15); + size = static_cast(backtrace(array, 15)); strings = backtrace_symbols(array, size); for (i = 0; i < size; i++) logger->log1(strings[i]); diff --git a/src/utils/physfstools.cpp b/src/utils/physfstools.cpp index 6f4345c36..1e2ef1e2e 100644 --- a/src/utils/physfstools.cpp +++ b/src/utils/physfstools.cpp @@ -54,7 +54,7 @@ namespace PhysFs _exit(1); } updateDirSeparator(); - atexit((void(*)()) PHYSFS_deinit); + atexit(reinterpret_cast(PHYSFS_deinit)); } void updateDirSeparator() diff --git a/src/utils/process.cpp b/src/utils/process.cpp index a12fb4301..a1c9d8a72 100644 --- a/src/utils/process.cpp +++ b/src/utils/process.cpp @@ -212,7 +212,10 @@ bool execFile(const std::string &pathName, const std::string &name, arg2.c_str(), static_cast(nullptr)); } _exit(-1); + PRAGMA45(GCC diagnostic push) + PRAGMA45(GCC diagnostic ignored "-Wunreachable-code-return") return false; + PRAGMA45(GCC diagnostic pop) } return true; } -- cgit v1.2.3-60-g2f50