From f37b73fb95d29efdcb24c3d30ceccc3883738e7e Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Wed, 16 Jul 2008 23:12:00 +0000 Subject: [PATCH] Avoid a warning when printing a pid_t. Pointed out by Morten Welinder. * glib/gslice.c (mem_error): Avoid a warning when printing a pid_t. Pointed out by Morten Welinder. svn path=/trunk/; revision=7196 --- ChangeLog | 7 +++++++ glib/gslice.c | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index a64b42f71..4cb30fbe3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-07-16 Matthias Clasen + + Bug 334234 – "printf" format error + + * glib/gslice.c (mem_error): Avoid a warning when printing a pid_t. + Pointed out by Morten Welinder. + 2008-07-16 Matthias Clasen Bug 406120 – g_ascii_strtod diff --git a/glib/gslice.c b/glib/gslice.c index 24040f47c..5bad65e53 100644 --- a/glib/gslice.c +++ b/glib/gslice.c @@ -1189,7 +1189,7 @@ mem_error (const char *format, /* at least, put out "MEMORY-ERROR", in case we segfault during the rest of the function */ fputs ("\n***MEMORY-ERROR***: ", stderr); pname = g_get_prgname(); - fprintf (stderr, "%s[%u]: GSlice: ", pname ? pname : "", getpid()); + fprintf (stderr, "%s[%ld]: GSlice: ", pname ? pname : "", (long)getpid()); va_start (args, format); vfprintf (stderr, format, args); va_end (args);