diff options
Diffstat (limited to 'meta-gnome/recipes-gnome/bonobo/libbonobo/fix-nonliteral-in-string.patch')
| -rw-r--r-- | meta-gnome/recipes-gnome/bonobo/libbonobo/fix-nonliteral-in-string.patch | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/meta-gnome/recipes-gnome/bonobo/libbonobo/fix-nonliteral-in-string.patch b/meta-gnome/recipes-gnome/bonobo/libbonobo/fix-nonliteral-in-string.patch new file mode 100644 index 0000000000..20db671e05 --- /dev/null +++ b/meta-gnome/recipes-gnome/bonobo/libbonobo/fix-nonliteral-in-string.patch | |||
| @@ -0,0 +1,26 @@ | |||
| 1 | This checks whether the format string is a literal on the calling function. As bonobo_debug_print() | ||
| 2 | takes already a va_list, we specify the format on the functions that call it | ||
| 3 | The second number, which is 0 here, should then be the argument index of the variadic argument | ||
| 4 | |||
| 5 | Fixed warning with clang | ||
| 6 | |||
| 7 | | ../../libbonobo-2.32.1/bonobo/bonobo-debug.c:58:32: error: format string is not a string literal [-Werror,-Wformat-nonliteral] | ||
| 8 | | vfprintf (_bonobo_debug_file, fmt, args); | ||
| 9 | | ^~~ | ||
| 10 | | 1 error generated. | ||
| 11 | |||
| 12 | Upstream-Status: Pending | ||
| 13 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 14 | |||
| 15 | Index: libbonobo-2.32.1/bonobo/bonobo-debug.c | ||
| 16 | =================================================================== | ||
| 17 | --- libbonobo-2.32.1.orig/bonobo/bonobo-debug.c | ||
| 18 | +++ libbonobo-2.32.1/bonobo/bonobo-debug.c | ||
| 19 | @@ -47,6 +47,7 @@ bonobo_debug_init(void) | ||
| 20 | _bonobo_debug_file = stderr; | ||
| 21 | } | ||
| 22 | |||
| 23 | +__attribute__((__format__ (printf, 2, 0))) | ||
| 24 | void | ||
| 25 | bonobo_debug_print (const char *name, char *fmt, ...) | ||
| 26 | { | ||
