[glib] gobject.h: Use correct format specifier for __LINE__
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] gobject.h: Use correct format specifier for __LINE__
- Date: Thu, 26 Feb 2015 11:33:16 +0000 (UTC)
commit d36f6a9633f18cbf14e8a52add66b40d8eb6a4da
Author: David King <dking redhat com>
Date: Mon Feb 9 11:23:58 2015 +0000
gobject.h: Use correct format specifier for __LINE__
GCC 5.0, with its new -Wformat-signedness, warns about the sign being
different between a type and the format string in printf-format
messages, leading to compiler warnings with G_OBJECT_WARN_INVALID_PSPEC.
In other uses of __LINE__ inside GLib, %d is used, and GCC seems to
expect a format specifier of %d as well:
https://gcc.gnu.org/onlinedocs/cpp/Standard-Predefined-Macros.html
https://bugzilla.gnome.org/show_bug.cgi?id=744263
gobject/gobject.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gobject/gobject.h b/gobject/gobject.h
index 70a99cc..a889d3c 100644
--- a/gobject/gobject.h
+++ b/gobject/gobject.h
@@ -627,7 +627,7 @@ G_STMT_START { \
GObject *_glib__object = (GObject*) (object); \
GParamSpec *_glib__pspec = (GParamSpec*) (pspec); \
guint _glib__property_id = (property_id); \
- g_warning ("%s:%u: invalid %s id %u for \"%s\" of type '%s' in '%s'", \
+ g_warning ("%s:%d: invalid %s id %u for \"%s\" of type '%s' in '%s'", \
__FILE__, __LINE__, \
(pname), \
_glib__property_id, \
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]