goheif icon indicating copy to clipboard operation
goheif copied to clipboard

Compiler warnings (linux)

Open gatuin opened this issue 4 years ago • 1 comments

There are compiler warnings being generated when this is included in any build. Builds should be able to complete with no warnings. We have an automated build process and it will mark any build as failed if there are warnings. One of those warnings is a constant that is redefined to a different value - that is a big warning flag for potential bugs.

In general it's not good practice to ignore compiler warnings.

# github.com/jdeng/goheif/libde265
In file included from libde265-all.inl:37:0,
                 from libde265.cc:2:
../../go/pkg/mod/github.com/jdeng/[email protected]/libde265/libde265/slice.cc:2447:0: warning: "MAX_PREFIX" redefined
 #define MAX_PREFIX 64

In file included from libde265-all.inl:13:0,
                 from libde265.cc:2:
../../go/pkg/mod/github.com/jdeng/[email protected]/libde265/libde265/cabac.cc:419:0: note: this is the location of the previous definition
 #define MAX_PREFIX 32

cc1plus: warning: unrecognized command line option ‘-Wno-constant-conversion’

gatuin avatar Jun 08 '20 05:06 gatuin

These too:

# github.com/adrium/goheif/libde265
In file included from libde265.cc:2:
In file included from vendor/github.com/adrium/goheif/libde265/libde265-all.inl:45:
vendor/github.com/adrium/goheif/libde265/libde265/x86/sse-motion.cc:3530:68: warning: implicit conversion from 'int' to 'short' changes value from 65535 to -1 [-Wconstant-conversion]
vendor/github.com/adrium/goheif/libde265/libde265/x86/sse-motion.cc:3530:58: warning: implicit conversion from 'int' to 'short' changes value from 65535 to -1 [-Wconstant-conversion]
vendor/github.com/adrium/goheif/libde265/libde265/x86/sse-motion.cc:3530:48: warning: implicit conversion from 'int' to 'short' changes value from 65535 to -1 [-Wconstant-conversion]
...

tagatac avatar Jul 12 '22 05:07 tagatac