chai2010 / webp

WebP decoder and encoder for Go (Zero Dependencies).
http://godoc.org/github.com/chai2010/webp
BSD 3-Clause "New" or "Revised" License
512 stars 89 forks source link

Warning in picture_csp_enc.c related to XOR operation #60

Open georgekakarlis opened 10 months ago

georgekakarlis commented 10 months ago

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/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] ../../../go/pkg/mod/github.com/chai2010/webp@v1.1.1/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:

elliotchenzichang commented 5 months ago

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