Give clang one less thing to complain about
"s"[i<2] and "s" + (i<2) are literally identical, but the latter triggers a warning from clang because it looks so much like a noob is trying to concatenate an integer and a string. The former is arguably more clear.
This commit is contained in:
parent
dfb75d9b6c
commit
3c0a73822d
2 changed files with 2 additions and 2 deletions
2
tccpe.c
2
tccpe.c
|
@ -965,7 +965,7 @@ static void pe_build_exports(struct pe_info *pe)
|
||||||
} else {
|
} else {
|
||||||
fprintf(op, "LIBRARY %s\n\nEXPORTS\n", dllname);
|
fprintf(op, "LIBRARY %s\n\nEXPORTS\n", dllname);
|
||||||
if (pe->s1->verbose)
|
if (pe->s1->verbose)
|
||||||
printf("<- %s (%d symbol%s)\n", buf, sym_count, "s" + (sym_count < 2));
|
printf("<- %s (%d symbol%s)\n", buf, sym_count, "s"[sym_count < 2]);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -390,7 +390,7 @@ usage:
|
||||||
}
|
}
|
||||||
|
|
||||||
if (v)
|
if (v)
|
||||||
printf("<- %s (%d symbol%s)\n", outfile, i, "s" + (i<2));
|
printf("<- %s (%d symbol%s)\n", outfile, i, "s"[i<2]);
|
||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue