You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

47 lines
1.4 KiB

  1. From 8cdbc7fb2c8c876902e457abe46ee18a0b134486 Mon Sep 17 00:00:00 2001
  2. From: coypu <coypu@sdf.org>
  3. Date: Wed, 2 Mar 2016 19:38:48 +0200
  4. Subject: gdate: Move warning pragma outside of function
  5. Commit 0817af40e8c74c721c30f6ef482b1f53d12044c7 breaks the build on
  6. older versions of GCC, which don't allow pragma inside functions.
  7. https://bugzilla.gnome.org/761550
  8. ---
  9. glib/gdate.c | 8 +++++---
  10. 1 file changed, 5 insertions(+), 3 deletions(-)
  11. diff --git a/glib/gdate.c b/glib/gdate.c
  12. index cdc735c..92c34d2 100644
  13. --- a/glib/gdate.c
  14. +++ b/glib/gdate.c
  15. @@ -2439,6 +2439,9 @@ win32_strftime_helper (const GDate *d,
  16. *
  17. * Returns: number of characters written to the buffer, or 0 the buffer was too small
  18. */
  19. +#pragma GCC diagnostic push
  20. +#pragma GCC diagnostic ignored "-Wformat-nonliteral"
  21. +
  22. gsize
  23. g_date_strftime (gchar *s,
  24. gsize slen,
  25. @@ -2494,10 +2497,7 @@ g_date_strftime (gchar *s,
  26. * recognize whether strftime actually failed or just returned "".
  27. */
  28. tmpbuf[0] = '\1';
  29. - #pragma GCC diagnostic push
  30. - #pragma GCC diagnostic ignored "-Wformat-nonliteral"
  31. tmplen = strftime (tmpbuf, tmpbufsize, locale_format, &tm);
  32. - #pragma GCC diagnostic pop
  33. if (tmplen == 0 && tmpbuf[0] != '\0')
  34. {
  35. @@ -2552,3 +2552,5 @@ g_date_strftime (gchar *s,
  36. return retval;
  37. #endif
  38. }
  39. +
  40. +#pragma GCC diagnostic pop
  41. --
  42. cgit v0.12