From: David Woodhouse Date: Sun, 5 Apr 2020 12:35:49 +0000 (+0100) Subject: Fix EPEL7 build. X-Git-Tag: v1.4~11 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=e5e02c1646bf82e7e5a47129876cd0b356da24d0;p=pidgin-chime.git Fix EPEL7 build. Yeah, we still can't use C99 unless we explicity ask for it. prpl/markdown.c: In function 'do_markdown': prpl/markdown.c:48:2: error: 'for' loop initial declarations are only allowed in C99 mode for (char *p = *outbound; *p; p++) { ^ --- diff --git a/prpl/markdown.c b/prpl/markdown.c index 0760a5c..fa0469e 100644 --- a/prpl/markdown.c +++ b/prpl/markdown.c @@ -14,6 +14,7 @@ do_markdown (const gchar *message, gchar **outbound) { int flags = MKD_NOTABLES | MKD_NOIMAGE | MKD_NOTABLES; /* Disable unsupported tags */ int nbytes, rc; gchar *res; + char *p; /* make a mkd doc */ doc = mkd_string(message, strlen(message), flags); @@ -45,7 +46,7 @@ do_markdown (const gchar *message, gchar **outbound) { /* TODO It'd be nice to improve this, e.g. by switching the UI to something that can render HTML or by replacing * the renderer with something that can produce properly formatted output for a GtkTextBuffer directly. */ - for (char *p = *outbound; *p; p++) { + for (p = *outbound; *p; p++) { /* Code tags are not supported, replace with documented */ if (!strncmp(p, "", 6)) { memcpy(p, " ", 6);