Opened 12 years ago

Closed 9 years ago

#4391 closed Bugs (fixed)

uninitialized data warning

Reported by: Piotr Trojanek <piotr.trojanek@…> Owned by: Sebastian Redl
Milestone: Boost 1.44.0 Component: property_tree
Version: Boost 1.44.0 Severity: Problem
Keywords: Cc:

Description

This warning is issued by QNX compiler:

boost/property_tree/stream_translator.hpp:189: warning: 'e' may be used uninitialized in this function

Change History (6)

comment:1 by Sebastian Redl, 12 years ago

Resolution: wontfix
Status: newclosed

The warning is broken, and the nature of this generic code doesn't give me much leeway in fixing it in C++03. I could use value_initialized, but that seems like massive overkill just to fix a broken warning in a rather obscure compiler.

comment:2 by Larry Lewis <lewislp@…>, 11 years ago

Same issue with g++ 4.4.5.

  • Flags: -O2 -Wall -Werror -fno-strict-aliasing
  • g++ (Ubuntu/Linaro 4.4.4-14ubuntu5) 4.4.5
  • Linux llewis 2.6.35-28-generic #50-Ubuntu SMP Fri Mar 18 18:42:20 UTC 2011 x86_64 GNU/Linux

Does not happen if -O0.

comment:3 by Larry Lewis <lewislp@…>, 11 years ago

Resolution: wontfix
Status: closedreopened

in reply to:  2 comment:4 by Larry Lewis <lewislp@…>, 11 years ago

Forgot to mention I'm using Boost 1.46.1.

comment:5 by Sebastian Redl, 10 years ago

(In [81507]) Don't use an uninitialized variable if trying to read a numeric char from a property and the value is out of bounds for the target type. See bug 4391. This is the only place where the warning that some compilers give makes sense; if it still occurs after this change, it's just broken.

comment:6 by Sebastian Redl, 9 years ago

Resolution: fixed
Status: reopenedclosed

Finally merged to master in e6958d6.

Note: See TracTickets for help on using tickets.