From 619a49c4219282bf8776183e76c1b4f0629a6d4c Mon Sep 17 00:00:00 2001 From: Matthias Dieter Wallnöfer Date: Mon, 6 Dec 2010 11:27:05 +0100 Subject: lib/util/fault.c - fix "pid_t" printf warning on Solaris According to "http://www.ibm.com/developerworks/linux/library/l-solar/" it's generally a 32bit "int" - therefore this cast should fit. --- lib/util/fault.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/util/fault.c b/lib/util/fault.c index 11b31d751e..bbb3190198 100644 --- a/lib/util/fault.c +++ b/lib/util/fault.c @@ -125,7 +125,7 @@ _PUBLIC_ _NORETURN_ void smb_panic(const char *why) char pidstr[20]; char cmdstring[200]; safe_strcpy(cmdstring, panic_action, sizeof(cmdstring)); - snprintf(pidstr, sizeof(pidstr), "%u", getpid()); + snprintf(pidstr, sizeof(pidstr), "%d", (int) getpid()); all_string_sub(cmdstring, "%PID%", pidstr, sizeof(cmdstring)); if (progname) { all_string_sub(cmdstring, "%PROG%", progname, sizeof(cmdstring)); -- cgit