From 608b8f8b44f03be1834b7f3d94dbf0fb0658843b Mon Sep 17 00:00:00 2001 From: Eduardo Bart Date: Thu, 9 Aug 2012 03:20:26 -0300 Subject: [PATCH] Fix a warning in clang --- src/framework/const.h | 1 - src/framework/core/application.cpp | 5 +++++ src/framework/core/application.h | 2 +- src/framework/platform/unixcrashhandler.cpp | 2 +- src/framework/platform/win32crashhandler.cpp | 2 +- 5 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/framework/const.h b/src/framework/const.h index 90b8e448..a95d1f9d 100644 --- a/src/framework/const.h +++ b/src/framework/const.h @@ -27,7 +27,6 @@ #define RAD_TO_DEC (180.0/acos(-1)) #define BUILD_COMPILER "gcc " __VERSION__ -#define BUILD_DATE __DATE__ #ifndef BUILD_COMMIT #define BUILD_COMMIT "devel" diff --git a/src/framework/core/application.cpp b/src/framework/core/application.cpp index 304ca86d..b7c99996 100644 --- a/src/framework/core/application.cpp +++ b/src/framework/core/application.cpp @@ -153,3 +153,8 @@ std::string Application::getOs() return "linux"; #endif } + +std::string Application::getBuildDate() +{ + return std::string(__DATE__); +} diff --git a/src/framework/core/application.h b/src/framework/core/application.h index 9f57ac34..0e96953e 100644 --- a/src/framework/core/application.h +++ b/src/framework/core/application.h @@ -53,7 +53,7 @@ public: const std::string& getVersion() { return m_appVersion; } std::string getBuildCompiler() { return BUILD_COMPILER; } - std::string getBuildDate() { return BUILD_DATE; } + std::string getBuildDate(); std::string getBuildRevision() { return BUILD_REVISION; } std::string getBuildCommit() { return BUILD_COMMIT; } std::string getBuildType() { return BUILD_TYPE; } diff --git a/src/framework/platform/unixcrashhandler.cpp b/src/framework/platform/unixcrashhandler.cpp index e51f0453..9388218b 100644 --- a/src/framework/platform/unixcrashhandler.cpp +++ b/src/framework/platform/unixcrashhandler.cpp @@ -44,7 +44,7 @@ void crashHandler(int signum, siginfo_t* info, void* secret) ss << stdext::format("app name: %s\n", g_app.getName()); ss << stdext::format("app version: %s\n", g_app.getVersion()); ss << stdext::format("build compiler: %s\n", BUILD_COMPILER); - ss << stdext::format("build date: %s\n", BUILD_DATE); + ss << stdext::format("build date: %s\n", __DATE__); ss << stdext::format("build type: %s\n", BUILD_TYPE); ss << stdext::format("build revision: %s (%s)\n", BUILD_REVISION, BUILD_COMMIT); ss << stdext::format("crash date: %s\n", stdext::date_time_string()); diff --git a/src/framework/platform/win32crashhandler.cpp b/src/framework/platform/win32crashhandler.cpp index bab406e4..8ee33c7d 100644 --- a/src/framework/platform/win32crashhandler.cpp +++ b/src/framework/platform/win32crashhandler.cpp @@ -114,7 +114,7 @@ LONG CALLBACK ExceptionHandler(LPEXCEPTION_POINTERS e) ss << stdext::format("app name: %s\n", g_app.getName().c_str()); ss << stdext::format("app version: %s\n", g_app.getVersion().c_str()); ss << stdext::format("build compiler: %s\n", BUILD_COMPILER); - ss << stdext::format("build date: %s\n", BUILD_DATE); + ss << stdext::format("build date: %s\n", __DATE__); ss << stdext::format("build type: %s\n", BUILD_TYPE); ss << stdext::format("build revision: %s (%s)\n", BUILD_REVISION, BUILD_COMMIT); ss << stdext::format("crash date: %s\n", stdext::date_time_string().c_str());