mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2025-01-18 14:21:36 +00:00
Fix more warnings
This commit is contained in:
parent
04665a9c94
commit
baf69f3725
5 changed files with 5 additions and 7 deletions
2
Makefile
2
Makefile
|
@ -10,8 +10,6 @@ ifeq ($(CC), clang)
|
|||
-Weverything \
|
||||
-Wno-missing-prototypes \
|
||||
-Wno-unused-parameter \
|
||||
-Wno-sign-compare \
|
||||
-Wno-implicit-fallthrough \
|
||||
-Wno-sign-conversion \
|
||||
-Wno-conversion \
|
||||
-Wno-disabled-macro-expansion \
|
||||
|
|
2
ftepp.c
2
ftepp.c
|
@ -1115,7 +1115,7 @@ static bool ftepp_hash(ftepp_t *ftepp)
|
|||
ftepp_error(ftepp, "unrecognized preprocessor directive: `%s`", ftepp_tokval(ftepp));
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
/* break; never reached */
|
||||
default:
|
||||
ftepp_error(ftepp, "unexpected preprocessor token: `%s`", ftepp_tokval(ftepp));
|
||||
return false;
|
||||
|
|
2
ir.c
2
ir.c
|
@ -3167,7 +3167,7 @@ bool ir_builder_generate(ir_builder *self, const char *filename)
|
|||
const char *qc_opname(int op)
|
||||
{
|
||||
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;
|
||||
switch (op) {
|
||||
case VINSTR_PHI: return "PHI";
|
||||
|
|
2
main.c
2
main.c
|
@ -256,7 +256,7 @@ static bool options_parse(int argc, char **argv) {
|
|||
case 'h':
|
||||
usage();
|
||||
exit(0);
|
||||
break;
|
||||
/* break; never reached because of exit(0) */
|
||||
|
||||
case 'E':
|
||||
opts_pp_only = true;
|
||||
|
|
4
util.c
4
util.c
|
@ -270,8 +270,8 @@ void util_endianswap(void *m, int s, int l) {
|
|||
if(*((char *)&s))
|
||||
return;
|
||||
|
||||
for(; w < l; w++) {
|
||||
for(; i < s << 1; i++) {
|
||||
for(; w < (size_t)l; w++) {
|
||||
for(; i < (size_t)(s << 1); i++) {
|
||||
unsigned char *p = (unsigned char *)m+w*s;
|
||||
unsigned char t = p[i];
|
||||
p[i] = p[s-i-1];
|
||||
|
|
Loading…
Reference in a new issue