[openssl-users] Warnings Compiling openssl 1.0.2d

Jeffrey Walton noloader at gmail.com
Tue Jul 21 19:54:18 UTC 2015


>>                           ^
>> d1_both.c: In function 'dtls1_retransmit_message':
>> d1_both.c:1261:9: warning: 'save_write_sequence' may be used
>> uninitialized in this function [-Wmaybe-uninitialized]
>>          memcpy(s->s3->write_sequence, save_write_sequence,
>>          ^
>
> This one is entirely bogus. "save_write_sequence" is initialized on line
> 1241. The compiler just isn't clever enough to figure that out.

Right. But we need to learn to work with our tools :) The other option
throws the baby out with the bath water by disabling warnings. Or, it
leaves the problem in places so thousands or millions of folks have to
look at the issue and clear it.

Just initialize it and let the optimizer do its job. It should
identify the dead store (the unneeded initialization) and optimize it
out.

Jeff


More information about the openssl-users mailing list