[SERVER-17235] unused-variable and uninitialized parameter with gcc5.0 Created: 09/Feb/15 Updated: 27/Apr/15 Resolved: 10/Feb/15 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Build |
| Affects Version/s: | 2.6.7 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Marek Skalický | Assignee: | Unassigned |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||
| Operating System: | ALL | ||||
| Steps To Reproduce: | Build mongoDB 2.6.7 with gcc 5.0.0 Builded by scons all \ |
||||
| Participants: | |||||
| Description |
|
mongoDB 2.6.7 fails to build with gcc 5.0 . There is problem with this: ::_theGlobalInitializer' defined but not used [-Werror=unused-variable] ------------------------------------------------------------------- ------------------------------------------------------------------- ------------------------------------------------------------------- src/mongo/db/commands/plan_cache_commands.cpp:338:48: warning: 'planCache' may be used uninitialized in this function [-Wmaybe-uninitialized] I suggest this could be fixed by adding -Wno-unused-variable and -Wno-maybe-uninitialized into SConstruct. I don't tried it, but guess this affects all mongoDB versions... |
| Comments |
| Comment by Andrew Morrow (Inactive) [ 10/Feb/15 ] |
|
Hi mskalick - I'm going to close this as works as designed, because I don't think we will be taking any further action in response to this information. Please feel free to re-open this ticket if there is anything more that we can do to help. Thanks, |
| Comment by Andrew Morrow (Inactive) [ 10/Feb/15 ] |
|
Hi mskalick - Correct: we have not yet validated our build with gcc-4.9 or newer, so we have not had an opportunity to evaluate novel warnings and decide if they indicate real latent issues in our code, are compiler false positives, or are something we just want to suppress. Until we do so, you will need to use --disable-warnings-as-errors if you are using GCC newer than 4.8. Thanks, |
| Comment by Marek Skalický [ 10/Feb/15 ] |
|
No, sorry for confusion. With --disable-warnings-as-errors it works fine. In the second part I only want to report where the problems (warnings) are... I haven't tried to build mongoDB 3.0 yet, but in the code (SConstruct) I haven't found similar gcc options. |
| Comment by Andrew Morrow (Inactive) [ 09/Feb/15 ] |
|
Hi - I'm a little confused by the second part of your description: are you saying that it still fails to build when using --disable-warnings-as-errors? Or only that it still issues warnings? We are unlikely to take any action on a maintenance branch to address warnings from newer compilers: such a situation is exactly the motivation for providing the --disable-warnings-as-errors option. Do these same warnings occur on the master branch? Also, please note that GCC 5 is still in development, and we are unlikely to begin testing with it until it is officially released. In particular, we don't want to spend time chasing false positive warnings that may not be presenting in the shipping version of the compiler. Thanks, |