Skip to content
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

cgo: silence false-positive clang warning #55

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

JackMordaunt
Copy link

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

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>
@lloyd
Copy link

lloyd commented Jan 26, 2023

👍

love it!

This makes it very hard to consume if a different decoder is desired.

Signed-off-by: Jack Mordaunt <jackmordaunt.dev@gmail.com>
Signed-off-by: Jack Mordaunt <jackmordaunt.dev@gmail.com>
@cinemast
Copy link

@chai2010 any chance we can get at least the commit to silence the warning merged and released?

@JackMordaunt
Copy link
Author

@cinemast don't hold your breath. You can find an alternative at https://git.sr.ht/~jackmordaunt/go-libwebp

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants