On Fri, Sep 16, 2011 at 2:30 PM, Jacek Caban jacek@codeweavers.com wrote:
--- a/dlls/vbscript/compile.c +++ b/dlls/vbscript/compile.c static HRESULT compile_while_statement(compile_ctx_t *ctx, while_statement_t *stat) {
- unsigned start_addr;
- unsigned start_addr, prev_label;
...
- if(stat->stat.type != STAT_WHILE) {
prev_label = ctx->while_end_label;
if((ctx->while_end_label = alloc_label(ctx)) == -1)
return E_OUTOFMEMORY;
- }
...
- if(stat->stat.type != STAT_WHILE) {
label_set_addr(ctx, ctx->while_end_label);
ctx->while_end_label = prev_label;
- }
Hello,
This patch introduces a compile warning (gcc 4.5.2, both x86 and amd64): ../compile.c:489:26: warning: ‘prev_label’ may be used uninitialized in this function
While I can see there's no actual problem, how can we shut the compiler's mouth? It may even be the case that if we just put a prev_label = 0 initializer, static analyzers will start complaining it's a useless assignment.
Octavian