]> granicus.if.org Git - vim/commitdiff
updated for version 7.3.1224 v7.3.1224
authorBram Moolenaar <Bram@vim.org>
Fri, 21 Jun 2013 16:31:23 +0000 (18:31 +0200)
committerBram Moolenaar <Bram@vim.org>
Fri, 21 Jun 2013 16:31:23 +0000 (18:31 +0200)
Problem:    Clang gives warnings on xxd.
Solution:   Change how to use part of a string. (Dominique Pelle) Also avoid
            warning for return not reached.

src/regexp_nfa.c
src/version.c
src/xxd/xxd.c

index f11c01a9c79b4c5c673687355f66ff18bafb4d4e..01bc065b969d7c96ca3bd7e1e71019c0e0c53c8a 100644 (file)
@@ -2611,7 +2611,7 @@ nfa_max_width(startstate, depth)
     if (depth > 4)
        return -1;
 
-    for (;;)
+    while (state != NULL)
     {
        switch (state->c)
        {
@@ -2810,7 +2810,7 @@ nfa_max_width(startstate, depth)
        state = state->out;
     }
 
-    /* unrecognized */
+    /* unrecognized, "cannot happen" */
     return -1;
 }
 
index 9a484dd0864dfd9fd811509ae242ddcd53e524e1..1bc2bae5dbb8932b317e80c9432c431337d67d0d 100644 (file)
@@ -728,6 +728,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1224,
 /**/
     1223,
 /**/
index 209ede43d1ca24b9fd337ab225a45234940b7e7b..e19874ad79e400df190978bdedc18875b7309930 100644 (file)
@@ -722,7 +722,7 @@ main(argc, argv)
       while ((length < 0 || p < length) && (c = getc(fp)) != EOF)
        {
          if (fprintf(fpo, (hexx == hexxa) ? "%s0x%02x" : "%s0X%02X",
-               (p % cols) ? ", " : ",\n  "+2*!p,  c) < 0)
+               (p % cols) ? ", " : &",\n  "[2*!p],  c) < 0)
            die(3);
          p++;
        }
@@ -731,7 +731,7 @@ main(argc, argv)
 
       if (p && fputs("\n", fpo) == EOF)
        die(3);
-      if (fputs("};\n" + 3 * (fp == stdin), fpo) == EOF)
+      if (fputs(&"};\n"[3 * (fp == stdin)], fpo) == EOF)
        die(3);
 
       if (fp != stdin)