webp icon indicating copy to clipboard operation
webp copied to clipboard

Warning in picture_csp_enc.c related to XOR operation

Open geokdev-afk opened this issue 2 years ago • 1 comments

Description: When building my Go Fyne project which uses the github.com/chai2010/webp library, I encountered the following warning:

In file included from z_libwebp_src_enc_picture_csp_enc.c:9: ../../../go/pkg/mod/github.com/chai2010/[email protected]/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] ../../../go/pkg/mod/github.com/chai2010/[email protected]/internal/libwebp-1.0.2/src/enc/picture_csp_enc.c:1002:40: note: replace expression with '0x2 ^ ALPHA_OFFSET' to silence this warning.

Steps to reproduce:

  1. Running the app or even building it with go build .
  2. fyne package and then run the executable

Environment:

  • Go version: 1.20.1
  • OS: MacOS 13.5.1

geokdev-afk avatar Sep 04 '23 08:09 geokdev-afk

https://github.com/chai2010/webp/pull/67 trying to fix this with this PR.

elliotchenzichang avatar Jan 30 '24 15:01 elliotchenzichang