1
0
forked from aniani/vim

updated for version 7.3.1224

Problem:    Clang gives warnings on xxd.
Solution:   Change how to use part of a string. (Dominique Pelle) Also avoid
            warning for return not reached.
This commit is contained in:
Bram Moolenaar 2013-06-21 18:31:23 +02:00
parent d73895ec00
commit fe70acb376
3 changed files with 6 additions and 4 deletions

View File

@ -2611,7 +2611,7 @@ nfa_max_width(startstate, depth)
if (depth > 4) if (depth > 4)
return -1; return -1;
for (;;) while (state != NULL)
{ {
switch (state->c) switch (state->c)
{ {
@ -2810,7 +2810,7 @@ nfa_max_width(startstate, depth)
state = state->out; state = state->out;
} }
/* unrecognized */ /* unrecognized, "cannot happen" */
return -1; return -1;
} }

View File

@ -728,6 +728,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
1224,
/**/ /**/
1223, 1223,
/**/ /**/

View File

@ -722,7 +722,7 @@ main(argc, argv)
while ((length < 0 || p < length) && (c = getc(fp)) != EOF) while ((length < 0 || p < length) && (c = getc(fp)) != EOF)
{ {
if (fprintf(fpo, (hexx == hexxa) ? "%s0x%02x" : "%s0X%02X", 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); die(3);
p++; p++;
} }
@ -731,7 +731,7 @@ main(argc, argv)
if (p && fputs("\n", fpo) == EOF) if (p && fputs("\n", fpo) == EOF)
die(3); die(3);
if (fputs("};\n" + 3 * (fp == stdin), fpo) == EOF) if (fputs(&"};\n"[3 * (fp == stdin)], fpo) == EOF)
die(3); die(3);
if (fp != stdin) if (fp != stdin)