[CXX-341] C++11 build of driver is broken w.r.t. timegm Created: 12/Sep/14  Updated: 23/Oct/14  Resolved: 12/Sep/14

Status: Closed
Project: C++ Driver
Component/s: Build
Affects Version/s: None
Fix Version/s: legacy-1.0.0-rc1

Type: Bug Priority: Major - P3
Reporter: Andrew Morrow (Inactive) Assignee: Adam Midvidy
Resolution: Done Votes: 0
Labels: legacy-cxx
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

In C+11 builds, we request C99, which makes timegm not exist, so we use the vendored copy. As it turns out, modern C+ compilers emit a warning/error when building that file:

rc/third_party/tz/timegm.c: In function 'gmtsub':
src/third_party/tz/timegm.c:186:14: error: the comparison will always evaluate as 'true' for the address of 'gmtmem' will never be NULL [-Werror=address]
   if (gmtptr != NULL)
              ^



 Comments   
Comment by Githook User [ 12/Sep/14 ]

Author:

{u'username': u'amidvidy', u'name': u'Adam Midvidy', u'email': u'amidvidy@gmail.com'}

Message: CXX-341 remove unneeded null check
Branch: legacy
https://github.com/mongodb/mongo-cxx-driver/commit/2da0a026f2d08946ed0481272f1e4b9bc58376b7

Comment by Adam Midvidy [ 12/Sep/14 ]

https://github.com/mongodb/mongo-cxx-driver/pull/158/files

Generated at Wed Feb 07 21:58:55 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.