0033-tools-pkg-config-fix-build-with-GCC-6.patch 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. From: Matthias Schiffer <mschiffer@universe-factory.net>
  2. Date: Sun, 8 May 2016 15:53:14 +0200
  3. Subject: tools: pkg-config: fix build with GCC 6
  4. Fixes the following error:
  5. gdate.c: In function ‘g_date_strftime’:
  6. gdate.c:2497:7: error: format not a string literal, format string not checked [-Werror=format-nonliteral]
  7. tmplen = strftime (tmpbuf, tmpbufsize, locale_format, &tm);
  8. ^~~~~~
  9. Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
  10. diff --git a/tools/pkg-config/patches/001-glib-gdate-suppress-string-format-literal-warning.patch b/tools/pkg-config/patches/001-glib-gdate-suppress-string-format-literal-warning.patch
  11. new file mode 100644
  12. index 0000000..6849299
  13. --- /dev/null
  14. +++ b/tools/pkg-config/patches/001-glib-gdate-suppress-string-format-literal-warning.patch
  15. @@ -0,0 +1,18 @@
  16. +--- a/glib/glib/gdate.c
  17. ++++ b/glib/glib/gdate.c
  18. +@@ -2439,6 +2439,9 @@ win32_strftime_helper (const GDate *d,
  19. + *
  20. + * Returns: number of characters written to the buffer, or 0 the buffer was too small
  21. + */
  22. ++#pragma GCC diagnostic push
  23. ++#pragma GCC diagnostic ignored "-Wformat-nonliteral"
  24. ++
  25. + gsize
  26. + g_date_strftime (gchar *s,
  27. + gsize slen,
  28. +@@ -2549,3 +2552,5 @@ g_date_strftime (gchar *s,
  29. + return retval;
  30. + #endif
  31. + }
  32. ++
  33. ++#pragma GCC diagnostic pop