'xxx' may be used uninitialized in this function

Bruce Korb bkorb@gnu.org
Wed Aug 9 16:10:00 GMT 2006


Here is the real code.  The complaint is about pOptTitle.
The compiler is GCC 4.1.1.  Both "set*OptFmts" functions
*WILL* set pOptTitle to something.  Option level is -O4, so
flow analysis is being done:

void
optionOnlyUsage(
    tOptions* pOpts,
    int       ex_code )
{
    const char * pOptTitle;

    /*
     *  Determine which header and which option formatting strings to use
     */
    if (checkGNUUsage(pOpts)) {
        (void)setGnuOptFmts( pOpts, &pOptTitle );
    }
    else {
        (void)setStdOptFmts( pOpts, &pOptTitle );
    }

    printOptionUsage( pOpts, ex_code, pOptTitle );
}



More information about the Gcc mailing list