-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GCC 8 warning in octree_key.h:143 type qualifiers ignored on cast result type [-Werror=ignored-qualifiers] #2404
Comments
How exactly is it failing to compile if it's a warning and not an error? Edit: Just noticed you passed Werror on the title. That's a ballsy flag to employ.
The idea from the original author is that I'm surprised about the warning and I'm confused why it is appearing. Thanks for reporting. |
I think GCC is warning that adding const to the static cast type doesn't do anything. So casting to a const unsigned char is the same as casting to an unsigned char. It's a rather pedantic warning, but still, would be nice if it is fixed. Of course, maxDepth should keep the const qualifier, it's only the static cast type that should change. |
Makes sense. Care to open a PR with the change. I’ll merge it ASAP.
Cheers
…--
On Thursday, Aug 30, 2018 at 6:23 PM, Alex Spitzer ***@***.*** ***@***.***)> wrote:
I think GCC is warning that adding const to the static cast type doesn't do anything. So casting to a const unsigned char is the same as casting to an unsigned char. It's a rather pedantic warning, but still, would be nice if it is fixed.
Of course, maxDepth should keep the const qualifier, it's only the static cast type that should change.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub (#2404 (comment)), or mute the thread (https://github.com/notifications/unsubscribe-auth/ABoUVg4f-4-yvmi1UWt8JKK5wj2nxeRlks5uWBGMgaJpZM4WSsaJ).
|
Done, thanks! |
pcl/octree/include/pcl/octree/octree_key.h
Line 143 in 5b89b76
Your Environment
Expected Behavior
The header files should compile without warnings.
Current Behavior
The header file octree_key.h fails to compile with the GCC 8 warning -Wignored-qualifiers.
Possible Solution
I believe const unsigned char should be changed to unsigned char in the static_cast.
The text was updated successfully, but these errors were encountered: