]> www.infradead.org Git - pidgin-chime.git/commitdiff
Fix EPEL7 build.
authorDavid Woodhouse <dwmw@amazon.co.uk>
Sun, 5 Apr 2020 12:35:49 +0000 (13:35 +0100)
committerDavid Woodhouse <dwmw@amazon.co.uk>
Sun, 5 Apr 2020 12:35:49 +0000 (13:35 +0100)
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++) {
  ^

prpl/markdown.c

index 0760a5cc5532cc2f04312c50b8b588f68863484d..fa0469e001a0ff7cc62ca06b17208b51ea301f3f 100644 (file)
@@ -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 <tt> */
                if (!strncmp(p, "<code>", 6)) {
                        memcpy(p, "  <tt>", 6);