Closed ChristophHaag closed 4 years ago
also clang 7 is affected
clang --version
clang version 3.7.0 (tags/RELEASE_370/final)
Target: x86_64-unknown-linux-gnu
Thread model: posix
jpgd.cpp:569:51: error: shifting a negative signed value is undefined [-Werror,-Wshift-negative-value]
static const int s_extend_offset[16] = { 0, ((-1)<<1) + 1, ((-1)<<2) + 1, ((-1)<<3) + 1, ((-1)<<4) + 1, ((-1)<<5) + 1, ((-1)<<6) + 1, ((-1)<<7) + 1, ((-1)<<8) + 1, ((-1)<<9) + 1, ((-1)<<10) + 1, ((-1)<<11) + 1, ((-1)<<12) + 1, ((-1...
~~~~^
can be resolved by applying the pull request #9
Fixed
They added a new warning: http://reviews.llvm.org/D10938
This line is affected: https://github.com/richgel999/jpeg-compressor/blob/fa962c9becd38c324064e9f4142721f749022a72/jpgd.cpp#L566