Re: [msi] initialize variable to placate static analyzers
13 Oct
2011
13 Oct
'11
9:34 a.m.
Hello Dan, Dan Kegel wrote:
Avoids the spurious compiler warning
msi.c: In function 'MSI_ApplyPatchW': msi.c:353:10: error: 'r' may be used uninitialized in this function
Hans says "It's compiler confusion but I'm fine with a patch that initializes r with ERROR_FUNCTION_FAILED." why don't you just initialize r in the declaration of r? It's the standard way of doing it and doesn't require a suboptimal comment (that warning is gcc version dependent).
bye michael
5178
Age (days ago)
5178
Last active (days ago)
0 comments
1 participants
participants (1)
-
Michael Stefaniuc