mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-23 04:42:32 +00:00
Fix an uninitialized warning from recent gcc.
Nifty: if you pass a struct via reference to a function, and a field of that struct may be both set and not set (eg, set only in an if statement), gcc will report that field assuming that fields that are never set will be set by the function (my interpretation). * taniwha ponders the flow analysis for that
This commit is contained in:
parent
dd03678a74
commit
099bbcbd8a
1 changed files with 2 additions and 4 deletions
|
@ -111,11 +111,9 @@ add_statement_def_ref (def_t *def, dstatement_t *st, int field)
|
|||
int alias_depth = 0;
|
||||
expr_t alias_depth_expr;
|
||||
|
||||
alias_depth_expr.file = def->file;
|
||||
alias_depth_expr.line = def->line;
|
||||
while (def->alias) {
|
||||
if (!alias_depth) {
|
||||
alias_depth_expr.file = def->file;
|
||||
alias_depth_expr.line = def->line;
|
||||
}
|
||||
alias_depth++;
|
||||
offset_reloc |= def->offset_reloc;
|
||||
def = def->alias;
|
||||
|
|
Loading…
Reference in a new issue