Fix more warnings

This commit is contained in:
Dale Weiler 2012-11-22 20:32:08 +00:00
parent 04665a9c94
commit baf69f3725
5 changed files with 5 additions and 7 deletions

View file

@ -10,8 +10,6 @@ ifeq ($(CC), clang)
-Weverything \ -Weverything \
-Wno-missing-prototypes \ -Wno-missing-prototypes \
-Wno-unused-parameter \ -Wno-unused-parameter \
-Wno-sign-compare \
-Wno-implicit-fallthrough \
-Wno-sign-conversion \ -Wno-sign-conversion \
-Wno-conversion \ -Wno-conversion \
-Wno-disabled-macro-expansion \ -Wno-disabled-macro-expansion \

View file

@ -1115,7 +1115,7 @@ static bool ftepp_hash(ftepp_t *ftepp)
ftepp_error(ftepp, "unrecognized preprocessor directive: `%s`", ftepp_tokval(ftepp)); ftepp_error(ftepp, "unrecognized preprocessor directive: `%s`", ftepp_tokval(ftepp));
return false; return false;
} }
break; /* break; never reached */
default: default:
ftepp_error(ftepp, "unexpected preprocessor token: `%s`", ftepp_tokval(ftepp)); ftepp_error(ftepp, "unexpected preprocessor token: `%s`", ftepp_tokval(ftepp));
return false; return false;

2
ir.c
View file

@ -3167,7 +3167,7 @@ bool ir_builder_generate(ir_builder *self, const char *filename)
const char *qc_opname(int op) const char *qc_opname(int op)
{ {
if (op < 0) return "<INVALID>"; if (op < 0) return "<INVALID>";
if (op < ( sizeof(asm_instr) / sizeof(asm_instr[0]) )) if (op < (int)( sizeof(asm_instr) / sizeof(asm_instr[0]) ))
return asm_instr[op].m; return asm_instr[op].m;
switch (op) { switch (op) {
case VINSTR_PHI: return "PHI"; case VINSTR_PHI: return "PHI";

2
main.c
View file

@ -256,7 +256,7 @@ static bool options_parse(int argc, char **argv) {
case 'h': case 'h':
usage(); usage();
exit(0); exit(0);
break; /* break; never reached because of exit(0) */
case 'E': case 'E':
opts_pp_only = true; opts_pp_only = true;

4
util.c
View file

@ -270,8 +270,8 @@ void util_endianswap(void *m, int s, int l) {
if(*((char *)&s)) if(*((char *)&s))
return; return;
for(; w < l; w++) { for(; w < (size_t)l; w++) {
for(; i < s << 1; i++) { for(; i < (size_t)(s << 1); i++) {
unsigned char *p = (unsigned char *)m+w*s; unsigned char *p = (unsigned char *)m+w*s;
unsigned char t = p[i]; unsigned char t = p[i];
p[i] = p[s-i-1]; p[i] = p[s-i-1];