Opened 13 years ago
Closed 12 years ago
#3477 closed Patches (worksforme)
warning: missing initializer for member ‘tm::tm_sec’ ..
Reported by: | Owned by: | az_sw_dude | |
---|---|---|---|
Milestone: | Component: | date_time | |
Version: | Boost 1.40.0 | Severity: | Cosmetic |
Keywords: | Cc: |
Description
We recently upgraded to boost 1.40 and now we got some new warnings from GCC:
warning: missing initializer for member ‘tm::tm_sec’ ...
I've attached a patch that fixes these (at least for the code we use, there might be other occurences).
Regards
Mirko
Attachments (1)
Change History (3)
by , 13 years ago
Attachment: | date_time.patch added |
---|
comment:1 by , 13 years ago
comment:2 by , 12 years ago
Resolution: | → worksforme |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
My testing shows that gcc 4.2.1 does not generate this error.
Comment (via email) from AndySem:
I'm not sure the patch is valid. std::tm can have different number of members on different compilers and thus the patch may bring either warnings or errors on other platforms. And the warning is nonsense in the first place, because zero initialization is intended to be done by the compiler (which it actually does).
I think, at least conditional compilation should be used in this case.