mirror of
https://github.com/alliedmodders/amxmodx.git
synced 2024-12-26 06:45:37 +03:00
Fix pointer-bool-conversion warning on newer compiler versions.
error: address of array 'lval->sym->name' will always evaluate to 'true'
This commit is contained in:
parent
7522403da8
commit
19dd940b22
@ -375,11 +375,11 @@ static int skim(int *opstr,void (*testfunc)(int),int dropval,int endval,
|
|||||||
} /* if */
|
} /* if */
|
||||||
dropout(lvalue,testfunc,droplab,lval);
|
dropout(lvalue,testfunc,droplab,lval);
|
||||||
if (!lvalue && sc_intest && (lval->ident==iARRAY || lval->ident==iREFARRAY)) {
|
if (!lvalue && sc_intest && (lval->ident==iARRAY || lval->ident==iREFARRAY)) {
|
||||||
error(33, lval->sym ? (lval->sym->name ? lval->sym->name : "-unknown") : "-unknown-"); /* array was not indexed in an expression */
|
error(33, lval->sym ? lval->sym->name : "-unknown-"); /* array was not indexed in an expression */
|
||||||
}
|
}
|
||||||
} else if (hits) { /* no (more) identical operators */
|
} else if (hits) { /* no (more) identical operators */
|
||||||
if (!lvalue && sc_intest && (lval->ident==iARRAY || lval->ident==iREFARRAY)) {
|
if (!lvalue && sc_intest && (lval->ident==iARRAY || lval->ident==iREFARRAY)) {
|
||||||
error(33, lval->sym ? (lval->sym->name ? lval->sym->name : "-unknown") : "-unknown-"); /* array was not indexed in an expression */
|
error(33, lval->sym ? lval->sym->name : "-unknown-"); /* array was not indexed in an expression */
|
||||||
}
|
}
|
||||||
dropout(lvalue,testfunc,droplab,lval); /* found at least one operator! */
|
dropout(lvalue,testfunc,droplab,lval); /* found at least one operator! */
|
||||||
ldconst(endval,sPRI);
|
ldconst(endval,sPRI);
|
||||||
|
Loading…
Reference in New Issue
Block a user