Topic: variables used before set in internal.c

In our setup, the compiler warning "variable is used before it is set" is promoted from warning to error, so it breaks our builds.

In "internal.c" around line 9255, there is the following code:

        byte*       out;
        int         outLen;
        byte        hashAlgo = sha_mac;
        byte        sigAlgo = anonymous_sa_algo;

        (void)out;
        (void)outLen;

While I don't understand the meaning of the last two lines, the compiler throws an error for outLen because this line uses it before it is set.
What's the purpose of those lines?
Can you either remove them or set an initial value to the two variables in future releases?

Share

Re: variables used before set in internal.c

Hi,

Thanks for bringing this to our attention.  The "(void)outLen" lines were put in place to fix a compiler warning related to unused variables. 

Can you let us know what compiler you are using (and if you are turning on any non-standard settings) so we can check for other potential areas where this may happen?

Thanks,
Chris