cgo: silence false-positive clang warning#55
Closed
JackMordaunt wants to merge 3 commits intochai2010:masterfrom
Closed
cgo: silence false-positive clang warning#55JackMordaunt wants to merge 3 commits intochai2010:masterfrom
JackMordaunt wants to merge 3 commits intochai2010:masterfrom
Conversation
Every build with Clang spits out this annoying warning message: \# github.com/chai2010/webp In file included from z_libwebp_src_enc_picture_csp_enc.c:9: ../../../../go/pkg/mod/github.com/chai2010/webp@v1.1.1/internal/libwebp-1.0.2/src/enc/picture_csp_enc.c:1002:40: warning: result of '2 ^ ALPHA_OFFSET' is 1; did you mean '1 << ALPHA_OFFSET' (8)? [-Wxor-used-as-pow] This commits silences that warning by supplying the requisite CFLAG. Signed-off-by: Jack Mordaunt <jackmordaunt.dev@gmail.com>
|
👍 love it! |
This makes it very hard to consume if a different decoder is desired. Signed-off-by: Jack Mordaunt <jackmordaunt.dev@gmail.com>
|
@chai2010 any chance we can get at least the commit to silence the warning merged and released? |
Author
|
@cinemast don't hold your breath. You can find an alternative at https://git.sr.ht/~jackmordaunt/go-libwebp |
|
I just tested #73 locally and it also removes the warning (it bumps to v1.4.0 of libwebp). Drop the following in your (you can use |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Every build with Clang spits out this annoying warning message:
This commits silences that warning by supplying the requisite CFLAG.
Signed-off-by: Jack Mordaunt jackmordaunt.dev@gmail.com