Opened 14 years ago

Closed 14 years ago

#1984 closed Bugs (fixed)

Uninitialized member warning for struct timespec

Reported by: Mathias.Krause@… Owned by: Anthony Williams
Milestone: Boost 1.36.0 Component: thread
Version: Boost 1.35.0 Severity: Cosmetic
Keywords: Cc:

Description

In boost/thread/xtime.hpp and boost/thread/pthread/timespec.hpp the struct timespec is not fully initialized. This results in nasty compiler warnings when using this header files in own projects and using the compiler switch -W (at least for g++ 3.3).

Small fix for this problem is to explicit initialize the whole struct not just the first member.

Patch for version 1.35.0 is attached – applies against SVN, too.

Attachments (1)

boost_1_35_0-timespec_init.diff (1.1 KB ) - added by Mathias.Krause@… 14 years ago.
Explicit initialize struct timespec and xtime to avoid compiler wanings

Download all attachments as: .zip

Change History (3)

by Mathias.Krause@…, 14 years ago

Explicit initialize struct timespec and xtime to avoid compiler wanings

comment:1 by Marshall Clow, 14 years ago

Component: Nonethread
Owner: set to Anthony Williams

comment:2 by Anthony Williams, 14 years ago

Resolution: fixed
Status: newclosed

Fixed on trunk

Note: See TracTickets for help on using tickets.