found this patch:
----------------------------------------------------------------------------------------------------------------------------
diff --git a/glib/gdate.c b/glib/gdate.c
index 4aece02..cdc735c 100644
--- a/glib/gdate.c
+++ b/glib/gdate.c
@@ -2494,7 +2494,10 @@ g_date_strftime (gchar *s,
* recognize whether strftime actually failed or just returned "".
*/
tmpbuf[0] = '\1';
+ #pragma GCC diagnostic push
+ #pragma GCC diagnostic ignored "-Wformat-nonliteral"
tmplen = strftime (tmpbuf, tmpbufsize, locale_format, &tm);
+ #pragma GCC diagnostic pop
if (tmplen == 0 && tmpbuf[0] != '\0')
{
-------------------------------------------------------------------------------------------------------------------------------------
HOW DO I APPLY PATCH?
_____________________________________________________________________________________
Here is pkg-config-0.29.1/glib/glib/gdate.c and the part which I think it is related to issue:
---------------------------------------------------------------------------------------------------------------------------------------
/**
* g_date_strftime:
* @s: destination buffer
* @slen: buffer size
* @format: format string
* @date: valid #GDate
*
* Generates a printed representation of the date, in a
* <link linkend="setlocale">locale</link>-specific way.
* Works just like the platform's C library strftime() function,
* but only accepts date-related formats; time-related formats
* give undefined results. Date must be valid. Unlike strftime()
* (which uses the locale encoding), works on a UTF-8 format
* string and stores a UTF-8 result.
*
* This function does not provide any conversion specifiers in
* addition to those implemented by the platform's C library.
* For example, don't expect that using g_date_strftime() would
* make the \%F provided by the C99 strftime() work on Windows
* where the C library only complies to C89.
*
* Returns: number of characters written to the buffer, or 0 the buffer was too small
*/
gsize
g_date_strftime (gchar *s,
gsize slen,
const gchar *format,
const GDate *d)
{
struct tm tm;
#ifndef G_OS_WIN32
gsize locale_format_len = 0;
gchar *locale_format;
gsize tmplen;
gchar *tmpbuf;
gsize tmpbufsize;
gsize convlen = 0;
gchar *convbuf;
GError *error = NULL;
gsize retval;
#endif
g_return_val_if_fail (g_date_valid (d), 0);
g_return_val_if_fail (slen > 0, 0);
g_return_val_if_fail (format != NULL, 0);
g_return_val_if_fail (s != NULL, 0);
g_date_to_struct_tm (d, &tm);
#ifdef G_OS_WIN32
if (!g_utf8_validate (format, -1, NULL))
{
s[0] = '\0';
return 0;
}
return win32_strftime_helper (d, format, &tm, s, slen);
#else
locale_format = g_locale_from_utf8 (format, -1, NULL, &locale_format_len, &error);
if (error)
{
g_warning (G_STRLOC "Error converting format to locale encoding: %s\n", error->message);
g_error_free (error);
s[0] = '\0';
return 0;
}
tmpbufsize = MAX (128, locale_format_len * 2);
while (TRUE)
{
tmpbuf = g_malloc (tmpbufsize);
/* Set the first byte to something other than '\0', to be able to
* recognize whether strftime actually failed or just returned "".
*/
tmpbuf[0] = '\1';
tmplen = strftime (tmpbuf, tmpbufsize, locale_format, &tm);
if (tmplen == 0 && tmpbuf[0] != '\0')
{
g_free (tmpbuf);
tmpbufsize *= 2;
if (tmpbufsize > 65536)
{
g_warning (G_STRLOC "Maximum buffer size for g_date_strftime exceeded: giving up\n");
g_free (locale_format);
s[0] = '\0';
return 0;
}
}
else
break;
}
g_free (locale_format);
convbuf = g_locale_to_utf8 (tmpbuf, tmplen, NULL, &convlen, &error);
g_free (tmpbuf);
if (error)
{
g_warning (G_STRLOC "Error converting results of strftime to UTF-8: %s\n", error->message);
g_error_free (error);
s[0] = '\0';
return 0;
}
if (slen <= convlen)
{
/* Ensure only whole characters are copied into the buffer.
*/
gchar *end = g_utf8_find_prev_char (convbuf, convbuf + slen);
g_assert (end != NULL);
convlen = end - convbuf;
/* Return 0 because the buffer isn't large enough.
*/
retval = 0;
}
else
retval = convlen;
memcpy (s, convbuf, convlen);
s[convlen] = '\0';
g_free (convbuf);
return retval;
#endif
}
-----------------------------------------------------------------------------------------------------------------------------------------------
Based on the PATCH, what do I need to change to make it work without the ERROR ?
Thanks!