summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormichi_cc <michi_cc@openttd.org>2009-10-17 22:36:35 +0000
committermichi_cc <michi_cc@openttd.org>2009-10-17 22:36:35 +0000
commitc850647e3aa9dc0408056c4b01d138fdd140e872 (patch)
tree3cd528bb6eaef1dd205b0270cca1df77dc3e0928
parent4baf768eda5ef05e0dfb994be5e190f85d76fc66 (diff)
downloadopenttd-c850647e3aa9dc0408056c4b01d138fdd140e872.tar.xz
(svn r17792) -Fix [FS#3261]: [OSX] Fix (bogus) compiler warnings related to printf argument checking.
-rw-r--r--src/os/macosx/crashlog_osx.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/os/macosx/crashlog_osx.cpp b/src/os/macosx/crashlog_osx.cpp
index 6ead8e3b2..1700ed04f 100644
--- a/src/os/macosx/crashlog_osx.cpp
+++ b/src/os/macosx/crashlog_osx.cpp
@@ -129,8 +129,8 @@ class CrashLogOSX : public CrashLog {
int status = -1;
char *func_name = abi::__cxa_demangle(dli.dli_sname, NULL, 0, &status);
- ptrdiff_t offset = (intptr_t)ip - (intptr_t)dli.dli_saddr;
- buffer += seprintf(buffer, last, " (%s + %d)", func_name != NULL ? func_name : dli.dli_sname, offset);
+ long int offset = (intptr_t)ip - (intptr_t)dli.dli_saddr;
+ buffer += seprintf(buffer, last, " (%s + %ld)", func_name != NULL ? func_name : dli.dli_sname, offset);
free(func_name);
}
@@ -188,13 +188,13 @@ public:
{
static const char crash_title[] =
"A serious fault condition occured in the game. The game will shut down.";
- static const char crash_info[] =
- "Please send the generated crash information and the last (auto)save to the developers. "
- "This will greatly help debugging. The correct place to do this is http://bugs.openttd.org.\n\n"
- "Generated file(s):\n%s\n%s";
char message[1024];
- seprintf(message, lastof(message), crash_info, this->filename_log, this->filename_save);
+ seprintf(message, lastof(message),
+ "Please send the generated crash information and the last (auto)save to the developers. "
+ "This will greatly help debugging. The correct place to do this is http://bugs.openttd.org.\n\n"
+ "Generated file(s):\n%s\n%s",
+ this->filename_log, this->filename_save);
ShowMacDialog(crash_title, message, "Quit");
}