diff options
author | Bram Moolenaar <Bram@vim.org> | 2013-06-21 18:31:23 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2013-06-21 18:31:23 +0200 |
commit | fe70acb3767ef10badd2eeb9928988c39ebebae8 (patch) | |
tree | 5da377fd1d857e55bb357187ec784ea05d9b329f /src/xxd | |
parent | d73895ec00b56e22bf4f95857aa88dd129e11d06 (diff) | |
download | vim-fe70acb3767ef10badd2eeb9928988c39ebebae8.zip |
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.
Diffstat (limited to 'src/xxd')
-rw-r--r-- | src/xxd/xxd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/xxd/xxd.c b/src/xxd/xxd.c index 209ede43d..e19874ad7 100644 --- a/src/xxd/xxd.c +++ b/src/xxd/xxd.c @@ -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) |