Opened 13 years ago
Closed 4 years ago
#4014 closed Patches (fixed)
[PATCH] boost/gil gcc warning cleanup
Reported by: | Owned by: | Stefan Seefeld | |
---|---|---|---|
Milestone: | Boost 1.43.0 | Component: | gil USE GITHUB |
Version: | Boost Development Trunk | Severity: | Cosmetic |
Keywords: | gcc warning | Cc: | mateusz@…, Mateusz Loskot |
Description
Patch to clean up excessive gcc 4.x warning barf.
To reproduce, compile any gil-using program with: -Wall -Wcast-align -Wconversion -Wdisabled-optimization -Werror=return-type -Wextra -Winit-self -Winvalid-pch -Wmissing-format-attribute -Wmissing-include-dirs -Wmissing-noreturn -Wno-multichar -Wpacked -Wredundant-decls -Wshadow -Wswitch-default -Wundef -Wwrite-strings -Wctor-dtor-privacy -Werror=non-virtual-dtor -Woverloaded-virtual
Attached patch fixes the issue.
Attachments (2)
Change History (6)
by , 13 years ago
Attachment: | boost_gil_gcc_warning_cleanup.diff added |
---|
comment:1 by , 6 years ago
Cc: | added |
---|
comment:2 by , 5 years ago
Owner: | changed from | to
---|
comment:3 by , 4 years ago
Cc: | added |
---|
by , 4 years ago
comment:4 by , 4 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Most of the warnings cleaned by the patch are -Wshadow diagnostics for constructor parameter/class member of the same name. Use of the same constructor parameter/class member names is fine C++ and I don't think we need any changes here.
I attached complete build log generated by b2 toolset=gcc
using GCC 7.3 and all the compilation flags suggested by the ticket's reporter and I no longer see any
warning: declaration of ... shadows a member of...
related to the suggested patch.
As for the io_error
function, it also seems no longer necessary.
BTW, GIL in Boost 1.68 delivers completely re-implemented I/O extensions. The new version does provide custom error_exit which does not call hard exit() to abort the application, so the issue should be gone now.
Closing as fixed.
github ref: https://github.com/boostorg/gil/projects/4#card-12435867
Complete build log generated by b2 toolset=gcc using GCC 7.3 and all the compilation flags suggested by the ticket's reporter