Warnings Compiling openssl 1.0.2d

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 21/07/15 21:40, Tom Browder wrote:
> On Tue, Jul 21, 2015 at 2:16 PM, Matt Caswell <matt at openssl.org> wrote:
>> On 21/07/15 15:33, Tom Browder wrote:
>>> On Sun, Jul 19, 2015 at 11:00 AM, Tom Browder <tom.browder at gmail.com> wrote:
>>> I lied.  After rebuilding gcc 5.2.0 and rechecking I get the following
>>> warnings from building 1.0.2d:
>>>
>>> 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.
> 
> Um, that initialization is in an if block, so that's not guaranteed, right?

Right, the initialization is in an if block. But the use on 1261 is also
in an if block. The conditions for each of the two if blocks are
identical. So both will be executed or neither will be executed
(assuming nothing changes the state so that the conditions evaluate
differently between the first and second if - which it doesn't).

Matt



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux