[SERVER-23452] Enable -Werror on Solaris Created: 31/Mar/16  Updated: 23/Nov/16  Resolved: 04/Apr/16

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: 3.3.3
Fix Version/s: 3.2.5, 3.3.5

Type: Bug Priority: Major - P3
Reporter: Mark Benvenuto Assignee: Mark Benvenuto
Resolution: Done Votes: 0
Labels: code-only
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by WT-2330 in-memory configurations should not c... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Completed:
Sprint: Platforms 12 (04/01/16)
Participants:

 Description   

Implicit function declarations in C can have unexpected results. We should make -Wimplicit-function-declaration an error. This warning is important since WiredTiger is written in C is compiled with different settings depending on when it is compiled in mongo vs standalone.

Example warnings from the solaris builder:

 [2016/03/31 13:35:08.113] src/third_party/wiredtiger/src/os_posix/os_alloc.c: In function '__wt_realloc_aligned':
 [2016/03/31 13:35:08.113] src/third_party/wiredtiger/src/os_posix/os_alloc.c:221:3: warning: implicit declaration of function 'posix_memalign' [-Wimplicit-function-declaration]
 [2016/03/31 13:35:08.113]    if ((ret = posix_memalign(&newp,
 [2016/03/31 13:35:08.113]    ^
 [2016/03/31 13:35:09.876] src/third_party/wiredtiger/src/os_posix/os_stdio.c: In function '__wt_fclose':
 [2016/03/31 13:35:09.876] src/third_party/wiredtiger/src/os_posix/os_stdio.c:117:3: warning: implicit declaration of function 'fileno' [-Wimplicit-function-declaration]
 [2016/03/31 13:35:09.876]    if (fsync(fileno(fp)) != 0)
 [2016/03/31 13:35:09.876]  
 [2016/03/31 13:35:10.095] src/third_party/wiredtiger/src/os_posix/os_time.c: In function '__wt_epoch':
 [2016/03/31 13:35:10.095] src/third_party/wiredtiger/src/os_posix/os_time.c:21:2: warning: implicit declaration of function 'clock_gettime' [-Wimplicit-function-declaration]
 [2016/03/31 13:35:10.095]   WT_SYSCALL_RETRY(clock_gettime(CLOCK_REALTIME, tsp), ret);
 [2016/03/31 13:35:10.095] 



 Comments   
Comment by Githook User [ 04/Apr/16 ]

Author:

{u'username': u'markbenvenuto', u'name': u'Mark Benvenuto', u'email': u'mark.benvenuto@mongodb.com'}

Message: SERVER-23452 Enable -Werror on Solaris

(cherry picked from commit 7bc77b9f6db91f0f66dc77e41c9c6212c944bf91)
Branch: v3.2
https://github.com/mongodb/mongo/commit/9cefba939a60b5ef64dde32ccfaf478441e9d3cb

Comment by Githook User [ 02/Apr/16 ]

Author:

{u'username': u'markbenvenuto', u'name': u'Mark Benvenuto', u'email': u'mark.benvenuto@mongodb.com'}

Message: SERVER-23452 Enable -Werror on Solaris
Branch: master
https://github.com/mongodb/mongo/commit/7bc77b9f6db91f0f66dc77e41c9c6212c944bf91

Comment by Mark Benvenuto [ 31/Mar/16 ]

After digging deeper, I plan to see how much effort it is to enable -Werror instead.

Generated at Thu Feb 08 04:03:25 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.