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

Compiling fails on Ubuntu 19.10 #2

Open
olivierberten opened this issue Jan 2, 2020 · 0 comments
Open

Compiling fails on Ubuntu 19.10 #2

olivierberten opened this issue Jan 2, 2020 · 0 comments

Comments

@olivierberten
Copy link

Running pip3 install etcpack on Ubuntu 19.10 gives this result:

Collecting etcpack
  Using cached https://files.pythonhosted.org/packages/30/cf/4ec8995b200190de2332e5fe7deb1a3d8b59ec577d740d757fb2f849941e/etcpack-1.0.1.tar.gz
Building wheels for collected packages: etcpack
  Running setup.py bdist_wheel for etcpack ... error
  Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-9xi2kuyx/etcpack/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/pip-wheel-hz0v1wfh --python-tag cp37:
  running bdist_wheel
  running build
  running build_ext
  building 'etcpack' extension
  creating build
  creating build/temp.linux-x86_64-3.7
  creating build/temp.linux-x86_64-3.7/etcpack
  creating build/temp.linux-x86_64-3.7/etcpack/source
  x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Ietcpack/source -I/usr/include/python3.7m -c etcpack.cpp -o build/temp.linux-x86_64-3.7/etcpack.o
  etcpack.cpp: In function ‘PyObject* __pyx_pw_7etcpack_11ETC2Decoder_3_unpack_etc(PyObject*, PyObject*, PyObject*)’:
  etcpack.cpp:4002:42: warning: ‘__pyx_v_newalphaimg’ may be used uninitialized in this function [-Wmaybe-uninitialized]
   4002 |           (__pyx_v_newalphaimg[__pyx_t_19]) = (__pyx_v_alphaimg[__pyx_t_18]);
        |                                          ^
  etcpack.cpp:1990:10: note: ‘__pyx_v_newalphaimg’ was declared here
   1990 |   uint8 *__pyx_v_newalphaimg;
        |          ^~~~~~~~~~~~~~~~~~~
  etcpack.cpp:4106:11: warning: ‘__pyx_v_alphaimg’ may be used uninitialized in this function [-Wmaybe-uninitialized]
   4106 |       free(__pyx_v_alphaimg);
        |       ~~~~^~~~~~~~~~~~~~~~~~
  etcpack.cpp:1987:10: note: ‘__pyx_v_alphaimg’ was declared here
   1987 |   uint8 *__pyx_v_alphaimg;
        |          ^~~~~~~~~~~~~~~~
  etcpack.cpp:2900:34: warning: ‘__pyx_v_alphaimg2’ may be used uninitialized in this function [-Wmaybe-uninitialized]
   2900 |         decompressBlockAlpha16bit(__pyx_v_alphablock, __pyx_v_alphaimg2, __pyx_v_width, __pyx_v_height, __pyx_t_7, __pyx_t_15);
        |         ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  etcpack.cpp:1988:10: note: ‘__pyx_v_alphaimg2’ was declared here
   1988 |   uint8 *__pyx_v_alphaimg2;
        |          ^~~~~~~~~~~~~~~~~
  x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Ietcpack/source -I/usr/include/python3.7m -c etcpack/source/image.cxx -o build/temp.linux-x86_64-3.7/etcpack/source/image.o
  etcpack/source/image.cxx:54: warning: ignoring #pragma warning  [-Wunknown-pragmas]
     54 | #pragma warning(disable : 4996)
        |
  etcpack/source/image.cxx:56: warning: ignoring #pragma warning  [-Wunknown-pragmas]
     56 | #pragma warning(disable : 4244)
        |
  etcpack/source/image.cxx: In function ‘bool fReadPPM(char*, int&, int&, unsigned char*&, int)’:
  etcpack/source/image.cxx:121:20: warning: format ‘%s’ expects a matching ‘char*’ argument [-Wformat=]
    121 |    printf("Error: %s is not binary\n");
        |                   ~^
        |                    |
        |                    char*
  x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Ietcpack/source -I/usr/include/python3.7m -c etcpack/source/etcpack.cxx -o build/temp.linux-x86_64-3.7/etcpack/source/etcpack.o
  etcpack/source/etcpack.cxx:96: warning: ignoring #pragma warning  [-Wunknown-pragmas]
     96 | #pragma warning(disable : 4996)
        |
  etcpack/source/etcpack.cxx:98: warning: ignoring #pragma warning  [-Wunknown-pragmas]
     98 | #pragma warning(disable : 4244)
        |
  etcpack/source/etcpack.cxx:162:1: error: a storage class can only be specified for objects and functions
    162 | static enum{PATTERN_H = 0,
        | ^~~~~~
  etcpack/source/etcpack.cxx:165:1: error: a storage class can only be specified for objects and functions
    165 | static enum{MODE_ETC1, MODE_THUMB_T, MODE_THUMB_H, MODE_PLANAR};
        | ^~~~~~
  etcpack/source/etcpack.cxx:205:1: error: a storage class can only be specified for objects and functions
    205 | static enum{ETC1_RGB_NO_MIPMAPS,ETC2PACKAGE_RGB_NO_MIPMAPS,ETC2PACKAGE_RGBA_NO_MIPMAPS_OLD,ETC2PACKAGE_RGBA_NO_MIPMAPS,ETC2PACKAGE_RGBA1_NO_MIPMAPS,ETC2PACKAGE_R_NO_MIPMAPS,ETC2PACKAGE_RG_NO_MIPMAPS,ETC2PACKAGE_R_SIGNED_NO_MIPMAPS,ETC2PACKAGE_RG_SIGNED_NO_MIPMAPS,ETC2PACKAGE_sRGB_NO_MIPMAPS,ETC2PACKAGE_sRGBA_NO_MIPMAPS,ETC2PACKAGE_sRGBA1_NO_MIPMAPS};
        | ^~~~~~
  etcpack/source/etcpack.cxx:206:1: error: a storage class can only be specified for objects and functions
    206 | static enum {MODE_COMPRESS, MODE_UNCOMPRESS, MODE_PSNR};
        | ^~~~~~
  etcpack/source/etcpack.cxx:207:1: error: a storage class can only be specified for objects and functions
    207 | static enum {SPEED_SLOW, SPEED_FAST, SPEED_MEDIUM};
        | ^~~~~~
  etcpack/source/etcpack.cxx:208:1: error: a storage class can only be specified for objects and functions
    208 | static enum {METRIC_PERCEPTUAL, METRIC_NONPERCEPTUAL};
        | ^~~~~~
  etcpack/source/etcpack.cxx:209:1: error: a storage class can only be specified for objects and functions
    209 | static enum {CODEC_ETC, CODEC_ETC2};
        | ^~~~~~
  etcpack/source/etcpack.cxx:247:1: error: a storage class can only be specified for objects and functions
    247 | static enum {GL_R=0x1903,GL_RG=0x8227,GL_RGB=0x1907,GL_RGBA=0x1908};
        | ^~~~~~
  etcpack/source/etcpack.cxx: In function ‘bool readSrcFile(char*, uint8*&, int&, int&, int&, int&)’:
  etcpack/source/etcpack.cxx:462:15: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
    462 |  if(fileExist("tmp.ppm"))
        |               ^~~~~~~~~
  etcpack/source/etcpack.cxx:473:10: warning: too many arguments for format [-Wformat-extra-args]
    473 |   printf("Copying source file to tmp.ppm\n", filename);
        |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  etcpack/source/etcpack.cxx:494:14: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
    494 |  if(fReadPPM("tmp.ppm",w1,h1,img,bitrate))
        |              ^~~~~~~~~
  etcpack/source/etcpack.cxx: In function ‘bool readSrcFileNoExpand(char*, uint8*&, int&, int&)’:
  etcpack/source/etcpack.cxx:560:15: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
    560 |  if(fileExist("tmp.ppm"))
        |               ^~~~~~~~~
  etcpack/source/etcpack.cxx:572:10: warning: too many arguments for format [-Wformat-extra-args]
    572 |   printf("Copying source file to tmp.ppm\n", filename);
        |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  etcpack/source/etcpack.cxx:590:14: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
    590 |  if(fReadPPM("tmp.ppm",w1,h1,img,8))
        |              ^~~~~~~~~
  etcpack/source/etcpack.cxx: In function ‘void readArguments(int, char**, char*, char*)’:
  etcpack/source/etcpack.cxx:617:37: warning: format ‘%s’ expects a matching ‘char*’ argument [-Wformat=]
    617 |     printf("flag missing argument: %s!\n");
        |                                    ~^
        |                                     |
        |                                     char*
  etcpack/source/etcpack.cxx: In function ‘void quantize444ColorCombined(float*, int*, uint8*)’:
  etcpack/source/etcpack.cxx:1578:8: warning: unused variable ‘min_error’ [-Wunused-variable]
   1578 |  float min_error=255*255*8*3;
        |        ^~~~~~~~~
  etcpack/source/etcpack.cxx:1580:15: warning: unused variable ‘best_table’ [-Wunused-variable]
   1580 |  unsigned int best_table=0;
        |               ^~~~~~~~~~
  etcpack/source/etcpack.cxx:1581:15: warning: unused variable ‘best_index’ [-Wunused-variable]
   1581 |  unsigned int best_index=0;
        |               ^~~~~~~~~~
  etcpack/source/etcpack.cxx:1654:9: warning: unused variable ‘drh’ [-Wunused-variable]
   1654 |   float drh = red_high-red_average;
        |         ^~~
  etcpack/source/etcpack.cxx:1655:8: warning: unused variable ‘dgh’ [-Wunused-variable]
   1655 |  float dgh = green_high-green_average;
        |        ^~~
  etcpack/source/etcpack.cxx:1656:8: warning: unused variable ‘dbh’ [-Wunused-variable]
   1656 |  float dbh = blue_high-blue_average;
        |        ^~~
  etcpack/source/etcpack.cxx: In function ‘void quantize555ColorCombined(float*, int*, uint8*)’:
  etcpack/source/etcpack.cxx:1753:8: warning: unused variable ‘min_error’ [-Wunused-variable]
   1753 |  float min_error=255*255*8*3;
        |        ^~~~~~~~~
  etcpack/source/etcpack.cxx:1755:15: warning: unused variable ‘best_table’ [-Wunused-variable]
   1755 |  unsigned int best_table=0;
        |               ^~~~~~~~~~
  etcpack/source/etcpack.cxx:1756:15: warning: unused variable ‘best_index’ [-Wunused-variable]
   1756 |  unsigned int best_index=0;
        |               ^~~~~~~~~~
  etcpack/source/etcpack.cxx:1829:9: warning: unused variable ‘drh’ [-Wunused-variable]
   1829 |   float drh = red_high-red_average;
        |         ^~~
  etcpack/source/etcpack.cxx:1830:8: warning: unused variable ‘dgh’ [-Wunused-variable]
   1830 |  float dgh = green_high-green_average;
        |        ^~~
  etcpack/source/etcpack.cxx:1831:8: warning: unused variable ‘dbh’ [-Wunused-variable]
   1831 |  float dbh = blue_high-blue_average;
        |        ^~~
  etcpack/source/etcpack.cxx: In function ‘void quantize444ColorCombinedPerceptual(float*, int*, uint8*)’:
  etcpack/source/etcpack.cxx:1908:8: warning: unused variable ‘min_error’ [-Wunused-variable]
   1908 |  float min_error=255*255*8*3;
        |        ^~~~~~~~~
  etcpack/source/etcpack.cxx:1910:15: warning: unused variable ‘best_table’ [-Wunused-variable]
   1910 |  unsigned int best_table=0;
        |               ^~~~~~~~~~
  etcpack/source/etcpack.cxx:1911:15: warning: unused variable ‘best_index’ [-Wunused-variable]
   1911 |  unsigned int best_index=0;
        |               ^~~~~~~~~~
  etcpack/source/etcpack.cxx:1992:9: warning: unused variable ‘drh’ [-Wunused-variable]
   1992 |   float drh = red_high-red_average;
        |         ^~~
  etcpack/source/etcpack.cxx:1993:8: warning: unused variable ‘dgh’ [-Wunused-variable]
   1993 |  float dgh = green_high-green_average;
        |        ^~~
  etcpack/source/etcpack.cxx:1994:8: warning: unused variable ‘dbh’ [-Wunused-variable]
   1994 |  float dbh = blue_high-blue_average;
        |        ^~~
  etcpack/source/etcpack.cxx: In function ‘void quantize555ColorCombinedPerceptual(float*, int*, uint8*)’:
  etcpack/source/etcpack.cxx:2062:8: warning: unused variable ‘min_error’ [-Wunused-variable]
   2062 |  float min_error=255*255*8*3;
        |        ^~~~~~~~~
  etcpack/source/etcpack.cxx:2064:15: warning: unused variable ‘best_table’ [-Wunused-variable]
   2064 |  unsigned int best_table=0;
        |               ^~~~~~~~~~
  etcpack/source/etcpack.cxx:2065:15: warning: unused variable ‘best_index’ [-Wunused-variable]
   2065 |  unsigned int best_index=0;
        |               ^~~~~~~~~~
  etcpack/source/etcpack.cxx:2146:9: warning: unused variable ‘drh’ [-Wunused-variable]
   2146 |   float drh = red_high-red_average;
        |         ^~~
  etcpack/source/etcpack.cxx:2147:8: warning: unused variable ‘dgh’ [-Wunused-variable]
   2147 |  float dgh = green_high-green_average;
        |        ^~~
  etcpack/source/etcpack.cxx:2148:8: warning: unused variable ‘dbh’ [-Wunused-variable]
   2148 |  float dbh = blue_high-blue_average;
        |        ^~~
  etcpack/source/etcpack.cxx: In function ‘unsigned int compressBlockOnlyIndividualAveragePerceptual1000(uint8*, int, int, int, int, unsigned int&, unsigned int&, int*, int*, int&, unsigned int&, unsigned int&, unsigned int&, unsigned int&, int*, int*, int*, int*)’:
  etcpack/source/etcpack.cxx:2212:15: warning: unused variable ‘best_table_indices1’ [-Wunused-variable]
   2212 |  unsigned int best_table_indices1=0, best_table_indices2=0;
        |               ^~~~~~~~~~~~~~~~~~~
  etcpack/source/etcpack.cxx:2212:38: warning: unused variable ‘best_table_indices2’ [-Wunused-variable]
   2212 |  unsigned int best_table_indices1=0, best_table_indices2=0;
        |                                      ^~~~~~~~~~~~~~~~~~~
  etcpack/source/etcpack.cxx: In function ‘int compressBlockOnlyIndividualAverage(uint8*, int, int, int, int, unsigned int&, unsigned int&, int*, int*, int&, unsigned int&, unsigned int&, unsigned int&, unsigned int&, int*, int*, int*, int*)’:
  etcpack/source/etcpack.cxx:2410:6: warning: unused variable ‘min_error’ [-Wunused-variable]
   2410 |  int min_error=255*255*8*3;
        |      ^~~~~~~~~
  etcpack/source/etcpack.cxx:2411:15: warning: unused variable ‘best_table_indices1’ [-Wunused-variable]
   2411 |  unsigned int best_table_indices1=0, best_table_indices2=0;
        |               ^~~~~~~~~~~~~~~~~~~
  etcpack/source/etcpack.cxx:2411:38: warning: unused variable ‘best_table_indices2’ [-Wunused-variable]
   2411 |  unsigned int best_table_indices1=0, best_table_indices2=0;
        |                                      ^~~~~~~~~~~~~~~~~~~
  etcpack/source/etcpack.cxx: In function ‘void compressBlockDiffFlipAverage(uint8*, int, int, int, int, unsigned int&, unsigned int&)’:
  etcpack/source/etcpack.cxx:2611:6: warning: unused variable ‘min_error’ [-Wunused-variable]
   2611 |  int min_error=255*255*8*3;
        |      ^~~~~~~~~
  etcpack/source/etcpack.cxx:2612:15: warning: unused variable ‘best_table_indices1’ [-Wunused-variable]
   2612 |  unsigned int best_table_indices1=0, best_table_indices2=0;
        |               ^~~~~~~~~~~~~~~~~~~
  etcpack/source/etcpack.cxx:2612:38: warning: unused variable ‘best_table_indices2’ [-Wunused-variable]
   2612 |  unsigned int best_table_indices1=0, best_table_indices2=0;
        |                                      ^~~~~~~~~~~~~~~~~~~
  etcpack/source/etcpack.cxx: In function ‘int compressBlockOnlyDiffFlipAverage(uint8*, int, int, int, int, unsigned int&, unsigned int&, int*, int*, int&)’:
  etcpack/source/etcpack.cxx:2928:6: warning: unused variable ‘min_error’ [-Wunused-variable]
   2928 |  int min_error=255*255*8*3;
        |      ^~~~~~~~~
  etcpack/source/etcpack.cxx:2929:15: warning: unused variable ‘best_table_indices1’ [-Wunused-variable]
   2929 |  unsigned int best_table_indices1=0, best_table_indices2=0;
        |               ^~~~~~~~~~~~~~~~~~~
  etcpack/source/etcpack.cxx:2929:38: warning: unused variable ‘best_table_indices2’ [-Wunused-variable]
   2929 |  unsigned int best_table_indices1=0, best_table_indices2=0;
        |                                      ^~~~~~~~~~~~~~~~~~~
  etcpack/source/etcpack.cxx: In function ‘unsigned int compressBlockOnlyDiffFlipAveragePerceptual1000(uint8*, int, int, int, int, unsigned int&, unsigned int&)’:
  etcpack/source/etcpack.cxx:3163:15: warning: unused variable ‘min_error’ [-Wunused-variable]
   3163 |  unsigned int min_error=MAXERR1000;
        |               ^~~~~~~~~
  etcpack/source/etcpack.cxx:3164:15: warning: unused variable ‘best_table_indices1’ [-Wunused-variable]
   3164 |  unsigned int best_table_indices1=0, best_table_indices2=0;
        |               ^~~~~~~~~~~~~~~~~~~
  etcpack/source/etcpack.cxx:3164:38: warning: unused variable ‘best_table_indices2’ [-Wunused-variable]
   3164 |  unsigned int best_table_indices1=0, best_table_indices2=0;
        |                                      ^~~~~~~~~~~~~~~~~~~
  etcpack/source/etcpack.cxx: In function ‘double compressBlockDiffFlipAveragePerceptual(uint8*, int, int, int, int, unsigned int&, unsigned int&)’:
  etcpack/source/etcpack.cxx:3385:6: warning: unused variable ‘min_error’ [-Wunused-variable]
   3385 |  int min_error=255*255*8*3;
        |      ^~~~~~~~~
  etcpack/source/etcpack.cxx:3386:15: warning: unused variable ‘best_table_indices1’ [-Wunused-variable]
   3386 |  unsigned int best_table_indices1=0, best_table_indices2=0;
        |               ^~~~~~~~~~~~~~~~~~~
  etcpack/source/etcpack.cxx:3386:38: warning: unused variable ‘best_table_indices2’ [-Wunused-variable]
   3386 |  unsigned int best_table_indices1=0, best_table_indices2=0;
        |                                      ^~~~~~~~~~~~~~~~~~~
  etcpack/source/etcpack.cxx: In function ‘void stuff57bits(unsigned int, unsigned int, unsigned int&, unsigned int&)’:
  etcpack/source/etcpack.cxx:4517:19: warning: suggest parentheses around operand of ‘!’ or change ‘&’ to ‘&&’ or ‘!’ to ‘~’ [-Wparentheses]
   4517 |  bit = (a & c) | (!a & b & c & d) | (a & b & !c & d);
        |                   ^~
  etcpack/source/etcpack.cxx: In function ‘void stuff58bits(unsigned int, unsigned int, unsigned int&, unsigned int&)’:
  etcpack/source/etcpack.cxx:4597:19: warning: suggest parentheses around operand of ‘!’ or change ‘&’ to ‘&&’ or ‘!’ to ‘~’ [-Wparentheses]
   4597 |  bit = (a & c) | (!a & b & c & d) | (a & b & !c & d);
        |                   ^~
  etcpack/source/etcpack.cxx: In function ‘void stuff58bitsDiffFalse(unsigned int, unsigned int, unsigned int&, unsigned int&)’:
  etcpack/source/etcpack.cxx:4637:19: warning: suggest parentheses around operand of ‘!’ or change ‘&’ to ‘&&’ or ‘!’ to ‘~’ [-Wparentheses]
   4637 |  bit = (a & c) | (!a & b & c & d) | (a & b & !c & d);
        |                   ^~
  etcpack/source/etcpack.cxx: In function ‘void stuff59bits(unsigned int, unsigned int, unsigned int&, unsigned int&)’:
  etcpack/source/etcpack.cxx:4699:19: warning: suggest parentheses around operand of ‘!’ or change ‘&’ to ‘&&’ or ‘!’ to ‘~’ [-Wparentheses]
   4699 |  bit = (a & c) | (!a & b & c & d) | (a & b & !c & d);
        |                   ^~
  etcpack/source/etcpack.cxx: In function ‘void compressBlockDiffFlipCombined(uint8*, int, int, int, int, unsigned int&, unsigned int&)’:
  etcpack/source/etcpack.cxx:4776:6: warning: unused variable ‘min_error’ [-Wunused-variable]
   4776 |  int min_error=255*255*8*3;
        |      ^~~~~~~~~
  etcpack/source/etcpack.cxx:4777:15: warning: unused variable ‘best_table_indices1’ [-Wunused-variable]
   4777 |  unsigned int best_table_indices1=0, best_table_indices2=0;
        |               ^~~~~~~~~~~~~~~~~~~
  etcpack/source/etcpack.cxx:4777:38: warning: unused variable ‘best_table_indices2’ [-Wunused-variable]
   4777 |  unsigned int best_table_indices1=0, best_table_indices2=0;
        |                                      ^~~~~~~~~~~~~~~~~~~
  etcpack/source/etcpack.cxx: In function ‘void computeColorLBGHalfIntensityFast(uint8*, int, int, int, uint8 (*)[3])’:
  etcpack/source/etcpack.cxx:5081:45: warning: unused variable ‘eps’ [-Wunused-variable]
   5081 |  double D = 0, oldD, bestD = MAXIMUM_ERROR, eps = 0.0000000001;
        |                                             ^~~
  etcpack/source/etcpack.cxx: In function ‘void computeColorLBGNotIntensityFast(uint8*, int, int, int, uint8 (*)[3])’:
  etcpack/source/etcpack.cxx:5275:45: warning: unused variable ‘eps’ [-Wunused-variable]
   5275 |  double D = 0, oldD, bestD = MAXIMUM_ERROR, eps = 0.0000000001;
        |                                             ^~~
  etcpack/source/etcpack.cxx: In function ‘void computeColorLBGNotIntensity(uint8*, int, int, int, uint8 (*)[3])’:
  etcpack/source/etcpack.cxx:5467:45: warning: unused variable ‘eps’ [-Wunused-variable]
   5467 |  double D = 0, oldD, bestD = MAXIMUM_ERROR, eps = 0.0000000001;
        |                                             ^~~
  etcpack/source/etcpack.cxx: In function ‘void computeColorLBG(uint8*, int, int, int, uint8 (*)[3])’:
  etcpack/source/etcpack.cxx:5659:45: warning: unused variable ‘eps’ [-Wunused-variable]
   5659 |  double D = 0, oldD, bestD = MAXIMUM_ERROR, eps = 0.0000000001;
        |                                             ^~~
  etcpack/source/etcpack.cxx: In function ‘void computeColorLBGfast(uint8*, int, int, int, uint8 (*)[3])’:
  etcpack/source/etcpack.cxx:5839:45: warning: unused variable ‘eps’ [-Wunused-variable]
   5839 |  double D = 0, oldD, bestD = MAXIMUM_ERROR, eps = 0.0000000001;
        |                                             ^~~
  etcpack/source/etcpack.cxx: In function ‘void packBlock59T(uint8 (*)[3], uint8, unsigned int, unsigned int&, unsigned int&)’:
  etcpack/source/etcpack.cxx:130:34: warning: result of ‘(2 << 31)’ requires 34 bits to represent, but ‘int’ only has 32 bits [-Wshift-overflow=]
    130 | #define MASK(size, startpos) (((2<<(size-1))-1) << SHIFT(size,startpos))
        |                                 ~^~~~~~~~~~
  etcpack/source/etcpack.cxx:131:63: note: in expansion of macro ‘MASK’
    131 | #define PUTBITS( dest, data, size, startpos) dest = ((dest & ~MASK(size, startpos)) | ((data << SHIFT(size, startpos)) & MASK(size,startpos)))
        |                                                               ^~~~
  etcpack/source/etcpack.cxx:6392:2: note: in expansion of macro ‘PUTBITS’
   6392 |  PUTBITS( compressed2, pixel_indices, 32, 31);
        |  ^~~~~~~
  etcpack/source/etcpack.cxx:130:34: warning: result of ‘(2 << 31)’ requires 34 bits to represent, but ‘int’ only has 32 bits [-Wshift-overflow=]
    130 | #define MASK(size, startpos) (((2<<(size-1))-1) << SHIFT(size,startpos))
        |                                 ~^~~~~~~~~~
  etcpack/source/etcpack.cxx:131:122: note: in expansion of macro ‘MASK’
    131 | #define PUTBITS( dest, data, size, startpos) dest = ((dest & ~MASK(size, startpos)) | ((data << SHIFT(size, startpos)) & MASK(size,startpos)))
        |                                                                                                                          ^~~~
  etcpack/source/etcpack.cxx:6392:2: note: in expansion of macro ‘PUTBITS’
   6392 |  PUTBITS( compressed2, pixel_indices, 32, 31);
        |  ^~~~~~~
  etcpack/source/etcpack.cxx: In function ‘unsigned int compressBlockTHUMB58HFastestPerceptual1000(uint8*, int, int, int, int, unsigned int&, unsigned int&)’:
  etcpack/source/etcpack.cxx:130:34: warning: result of ‘(2 << 31)’ requires 34 bits to represent, but ‘int’ only has 32 bits [-Wshift-overflow=]
    130 | #define MASK(size, startpos) (((2<<(size-1))-1) << SHIFT(size,startpos))
        |                                 ~^~~~~~~~~~
  etcpack/source/etcpack.cxx:131:63: note: in expansion of macro ‘MASK’
    131 | #define PUTBITS( dest, data, size, startpos) dest = ((dest & ~MASK(size, startpos)) | ((data << SHIFT(size, startpos)) & MASK(size,startpos)))
        |                                                               ^~~~
  etcpack/source/etcpack.cxx:6985:2: note: in expansion of macro ‘PUTBITS’
   6985 |  PUTBITS( compressed2, best_pixel_indices, 32, 31);
        |  ^~~~~~~
  etcpack/source/etcpack.cxx:130:34: warning: result of ‘(2 << 31)’ requires 34 bits to represent, but ‘int’ only has 32 bits [-Wshift-overflow=]
    130 | #define MASK(size, startpos) (((2<<(size-1))-1) << SHIFT(size,startpos))
        |                                 ~^~~~~~~~~~
  etcpack/source/etcpack.cxx:131:122: note: in expansion of macro ‘MASK’
    131 | #define PUTBITS( dest, data, size, startpos) dest = ((dest & ~MASK(size, startpos)) | ((data << SHIFT(size, startpos)) & MASK(size,startpos)))
        |                                                                                                                          ^~~~
  etcpack/source/etcpack.cxx:6985:2: note: in expansion of macro ‘PUTBITS’
   6985 |  PUTBITS( compressed2, best_pixel_indices, 32, 31);
        |  ^~~~~~~
  etcpack/source/etcpack.cxx: In function ‘double compressBlockTHUMB58HFastest(uint8*, int, int, int, int, unsigned int&, unsigned int&)’:
  etcpack/source/etcpack.cxx:130:34: warning: result of ‘(2 << 31)’ requires 34 bits to represent, but ‘int’ only has 32 bits [-Wshift-overflow=]
    130 | #define MASK(size, startpos) (((2<<(size-1))-1) << SHIFT(size,startpos))
        |                                 ~^~~~~~~~~~
  etcpack/source/etcpack.cxx:131:63: note: in expansion of macro ‘MASK’
    131 | #define PUTBITS( dest, data, size, startpos) dest = ((dest & ~MASK(size, startpos)) | ((data << SHIFT(size, startpos)) & MASK(size,startpos)))
        |                                                               ^~~~
  etcpack/source/etcpack.cxx:7062:2: note: in expansion of macro ‘PUTBITS’
   7062 |  PUTBITS( compressed2, best_pixel_indices, 32, 31);
        |  ^~~~~~~
  etcpack/source/etcpack.cxx:130:34: warning: result of ‘(2 << 31)’ requires 34 bits to represent, but ‘int’ only has 32 bits [-Wshift-overflow=]
    130 | #define MASK(size, startpos) (((2<<(size-1))-1) << SHIFT(size,startpos))
        |                                 ~^~~~~~~~~~
  etcpack/source/etcpack.cxx:131:122: note: in expansion of macro ‘MASK’
    131 | #define PUTBITS( dest, data, size, startpos) dest = ((dest & ~MASK(size, startpos)) | ((data << SHIFT(size, startpos)) & MASK(size,startpos)))
        |                                                                                                                          ^~~~
  etcpack/source/etcpack.cxx:7062:2: note: in expansion of macro ‘PUTBITS’
   7062 |  PUTBITS( compressed2, best_pixel_indices, 32, 31);
        |  ^~~~~~~
  etcpack/source/etcpack.cxx: In function ‘double compressBlockTHUMB58HAlpha(uint8*, uint8*, int, int, int, int, unsigned int&, unsigned int&)’:
  etcpack/source/etcpack.cxx:130:34: warning: result of ‘(2 << 31)’ requires 34 bits to represent, but ‘int’ only has 32 bits [-Wshift-overflow=]
    130 | #define MASK(size, startpos) (((2<<(size-1))-1) << SHIFT(size,startpos))
        |                                 ~^~~~~~~~~~
  etcpack/source/etcpack.cxx:131:63: note: in expansion of macro ‘MASK’
    131 | #define PUTBITS( dest, data, size, startpos) dest = ((dest & ~MASK(size, startpos)) | ((data << SHIFT(size, startpos)) & MASK(size,startpos)))
        |                                                               ^~~~
  etcpack/source/etcpack.cxx:7126:2: note: in expansion of macro ‘PUTBITS’
   7126 |  PUTBITS( compressed2, best_pixel_indices, 32, 31);
        |  ^~~~~~~
  etcpack/source/etcpack.cxx:130:34: warning: result of ‘(2 << 31)’ requires 34 bits to represent, but ‘int’ only has 32 bits [-Wshift-overflow=]
    130 | #define MASK(size, startpos) (((2<<(size-1))-1) << SHIFT(size,startpos))
        |                                 ~^~~~~~~~~~
  etcpack/source/etcpack.cxx:131:122: note: in expansion of macro ‘MASK’
    131 | #define PUTBITS( dest, data, size, startpos) dest = ((dest & ~MASK(size, startpos)) | ((data << SHIFT(size, startpos)) & MASK(size,startpos)))
        |                                                                                                                          ^~~~
  etcpack/source/etcpack.cxx:7126:2: note: in expansion of macro ‘PUTBITS’
   7126 |  PUTBITS( compressed2, best_pixel_indices, 32, 31);
        |  ^~~~~~~
  etcpack/source/etcpack.cxx: In function ‘double compressBlockTHUMB58HFast(uint8*, int, int, int, int, unsigned int&, unsigned int&)’:
  etcpack/source/etcpack.cxx:130:34: warning: result of ‘(2 << 31)’ requires 34 bits to represent, but ‘int’ only has 32 bits [-Wshift-overflow=]
    130 | #define MASK(size, startpos) (((2<<(size-1))-1) << SHIFT(size,startpos))
        |                                 ~^~~~~~~~~~
  etcpack/source/etcpack.cxx:131:63: note: in expansion of macro ‘MASK’
    131 | #define PUTBITS( dest, data, size, startpos) dest = ((dest & ~MASK(size, startpos)) | ((data << SHIFT(size, startpos)) & MASK(size,startpos)))
        |                                                               ^~~~
  etcpack/source/etcpack.cxx:7240:2: note: in expansion of macro ‘PUTBITS’
   7240 |  PUTBITS( compressed2, best_pixel_indices, 32, 31);
        |  ^~~~~~~
  etcpack/source/etcpack.cxx:130:34: warning: result of ‘(2 << 31)’ requires 34 bits to represent, but ‘int’ only has 32 bits [-Wshift-overflow=]
    130 | #define MASK(size, startpos) (((2<<(size-1))-1) << SHIFT(size,startpos))
        |                                 ~^~~~~~~~~~
  etcpack/source/etcpack.cxx:131:122: note: in expansion of macro ‘MASK’
    131 | #define PUTBITS( dest, data, size, startpos) dest = ((dest & ~MASK(size, startpos)) | ((data << SHIFT(size, startpos)) & MASK(size,startpos)))
        |                                                                                                                          ^~~~
  etcpack/source/etcpack.cxx:7240:2: note: in expansion of macro ‘PUTBITS’
   7240 |  PUTBITS( compressed2, best_pixel_indices, 32, 31);
        |  ^~~~~~~
  etcpack/source/etcpack.cxx: In function ‘void compressBlockDiffFlipCombinedPerceptual(uint8*, int, int, int, int, unsigned int&, unsigned int&)’:
  etcpack/source/etcpack.cxx:7259:6: warning: unused variable ‘min_error’ [-Wunused-variable]
   7259 |  int min_error=255*255*8*3;
        |      ^~~~~~~~~
  etcpack/source/etcpack.cxx:7260:15: warning: unused variable ‘best_table_indices1’ [-Wunused-variable]
   7260 |  unsigned int best_table_indices1=0, best_table_indices2=0;
        |               ^~~~~~~~~~~~~~~~~~~
  etcpack/source/etcpack.cxx:7260:38: warning: unused variable ‘best_table_indices2’ [-Wunused-variable]
   7260 |  unsigned int best_table_indices1=0, best_table_indices2=0;
        |                                      ^~~~~~~~~~~~~~~~~~~
  etcpack/source/etcpack.cxx: In function ‘int compressBlockDifferentialWithAlpha(bool, uint8*, uint8*, uint8*, int, int, int, int, unsigned int&, unsigned int&)’:
  etcpack/source/etcpack.cxx:7673:6: warning: unused variable ‘min_error’ [-Wunused-variable]
   7673 |  int min_error=255*255*8*3;
        |      ^~~~~~~~~
  etcpack/source/etcpack.cxx: In function ‘void stuff59bitsDiffFalse(unsigned int, unsigned int, unsigned int&, unsigned int&)’:
  etcpack/source/etcpack.cxx:8096:19: warning: suggest parentheses around operand of ‘!’ or change ‘&’ to ‘&&’ or ‘!’ to ‘~’ [-Wparentheses]
   8096 |  bit = (a & c) | (!a & b & c & d) | (a & b & !c & d);
        |                   ^~
  etcpack/source/etcpack.cxx: In function ‘void readAlpha(uint8*&, int&, int&, int&, int&)’:
  etcpack/source/etcpack.cxx:8516:11: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
   8516 |  fReadPGM("alpha.pgm",width,height,tempdata,wantedBitDepth);
        |           ^~~~~~~~~~~
  etcpack/source/etcpack.cxx: In function ‘void compressBlockAlphaSlow(uint8*, int, int, int, int, uint8*)’:
  etcpack/source/etcpack.cxx:8893:6: warning: unused variable ‘maxdist’ [-Wunused-variable]
   8893 |  int maxdist=-2;
        |      ^~~~~~~
  etcpack/source/etcpack.cxx: In function ‘void uncompressFile(char*, uint8*&, uint8*&, int&, int&)’:
  etcpack/source/etcpack.cxx:9114:6: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
   9114 |  if(f=fopen(srcfile,"rb"))
        |     ~^~~~~~~~~~~~~~~~~~~~
  etcpack/source/etcpack.cxx:9211:13: warning: too many arguments for format [-Wformat-extra-args]
   9211 |      printf("Known formats: ETC1_RGB_NO_MIPMAPS.\n", srcfile);
        |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  etcpack/source/etcpack.cxx:9255:13: warning: too many arguments for format [-Wformat-extra-args]
   9255 |      printf("Known formats: ETC2PACKAGE_RGB_NO_MIPMAPS.\n", srcfile);
        |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  etcpack/source/etcpack.cxx: In function ‘void writeOutputFile(char*, uint8*, uint8*, int, int)’:
  etcpack/source/etcpack.cxx:9460:13: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
   9460 |   fWritePPM("tmp.ppm",width,height,img,8,false);
        |             ^~~~~~~~~
  etcpack/source/etcpack.cxx:9465:13: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
   9465 |   fWritePPM("tmp.ppm",width,height,img,16,false);
        |             ^~~~~~~~~
  etcpack/source/etcpack.cxx:9468:13: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
   9468 |   fWritePGM("alphaout.pgm",width,height,alphaimg,false,8);
        |             ^~~~~~~~~~~~~~
  etcpack/source/etcpack.cxx:9470:13: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
   9470 |   fWritePGM("alphaout.pgm",width,height,alphaimg,false,16);
        |             ^~~~~~~~~~~~~~
  etcpack/source/etcpack.cxx:9506:13: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
   9506 |    fReadPPM("tmp.ppm", rw, rh, pixelsRGB, 8);
        |             ^~~~~~~~~
  etcpack/source/etcpack.cxx:9507:22: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
   9507 |             fReadPGM("alphaout.pgm", rw, rh, pixelsA, 8);
        |                      ^~~~~~~~~~~~~~
  etcpack/source/etcpack.cxx:9511:25: warning: zero-length gnu_printf format string [-Wformat-zero-length]
   9511 |             sprintf(str,""); // Nothing to execute.
        |                         ^~
  etcpack/source/etcpack.cxx: In function ‘double calculatePSNRfile(char*, uint8*, uint8*)’:
  etcpack/source/etcpack.cxx:9541:23: warning: unused variable ‘MSEB’ [-Wunused-variable]
   9541 |  double MSER=0,MSEG=0,MSEB=0,MSEA, PSNRR,PSNRG,PSNRA;
        |                       ^~~~
  etcpack/source/etcpack.cxx:9551:6: warning: unused variable ‘height’ [-Wunused-variable]
   9551 |  int height=((active_height+3)/4)*4;
        |      ^~~~~~
  etcpack/source/etcpack.cxx: In function ‘unsigned int compressBlockIndividualExhaustivePerceptual(uint8*, int, int, int, int, unsigned int&, unsigned int&, unsigned int)’:
  etcpack/source/etcpack.cxx:10480:15: warning: unused variable ‘best_err_norm_diff’ [-Wunused-variable]
  10480 |  unsigned int best_err_norm_diff = MAXERR1000;
        |               ^~~~~~~~~~~~~~~~~~
  etcpack/source/etcpack.cxx:10481:15: warning: unused variable ‘best_err_norm_444’ [-Wunused-variable]
  10481 |  unsigned int best_err_norm_444 = MAXERR1000;
        |               ^~~~~~~~~~~~~~~~~
  etcpack/source/etcpack.cxx:10482:15: warning: unused variable ‘best_err_flip_diff’ [-Wunused-variable]
  10482 |  unsigned int best_err_flip_diff = MAXERR1000;
        |               ^~~~~~~~~~~~~~~~~~
  etcpack/source/etcpack.cxx:10483:15: warning: unused variable ‘best_err_flip_444’ [-Wunused-variable]
  10483 |  unsigned int best_err_flip_444 = MAXERR1000;
        |               ^~~~~~~~~~~~~~~~~
  etcpack/source/etcpack.cxx:10489:6: warning: unused variable ‘min_error’ [-Wunused-variable]
  10489 |  int min_error=MAXERR1000;
        |      ^~~~~~~~~
  etcpack/source/etcpack.cxx:10494:15: warning: unused variable ‘pixel_indices1_MSB’ [-Wunused-variable]
  10494 |  unsigned int pixel_indices1_MSB=0;
        |               ^~~~~~~~~~~~~~~~~~
  etcpack/source/etcpack.cxx:10495:15: warning: unused variable ‘pixel_indices1_LSB’ [-Wunused-variable]
  10495 |  unsigned int pixel_indices1_LSB=0;
        |               ^~~~~~~~~~~~~~~~~~
  etcpack/source/etcpack.cxx:10496:15: warning: unused variable ‘pixel_indices2_MSB’ [-Wunused-variable]
  10496 |  unsigned int pixel_indices2_MSB=0;
        |               ^~~~~~~~~~~~~~~~~~
  etcpack/source/etcpack.cxx:10501:15: warning: unused variable ‘pixel_indices2_LSB’ [-Wunused-variable]
  10501 |  unsigned int pixel_indices2_LSB=0;
        |               ^~~~~~~~~~~~~~~~~~
  etcpack/source/etcpack.cxx:10514:15: warning: unused variable ‘table1’ [-Wunused-variable]
  10514 |  unsigned int table1=0, table2=0;
        |               ^~~~~~
  etcpack/source/etcpack.cxx:10514:25: warning: unused variable ‘table2’ [-Wunused-variable]
  10514 |  unsigned int table1=0, table2=0;
        |                         ^~~~~~
  etcpack/source/etcpack.cxx:10585:15: warning: unused variable ‘tryblocks’ [-Wunused-variable]
  10585 |  unsigned int tryblocks = 0;
        |               ^~~~~~~~~
  etcpack/source/etcpack.cxx:10586:15: warning: unused variable ‘allblocks’ [-Wunused-variable]
  10586 |  unsigned int allblocks = 0;
        |               ^~~~~~~~~
  etcpack/source/etcpack.cxx: In function ‘unsigned int compressBlockIndividualExhaustive(uint8*, int, int, int, int, unsigned int&, unsigned int&, unsigned int)’:
  etcpack/source/etcpack.cxx:10765:15: warning: unused variable ‘best_err_norm_diff’ [-Wunused-variable]
  10765 |  unsigned int best_err_norm_diff = 255*255*16*3;
        |               ^~~~~~~~~~~~~~~~~~
  etcpack/source/etcpack.cxx:10766:15: warning: unused variable ‘best_err_norm_444’ [-Wunused-variable]
  10766 |  unsigned int best_err_norm_444 = 255*255*16*3;
        |               ^~~~~~~~~~~~~~~~~
  etcpack/source/etcpack.cxx:10767:15: warning: unused variable ‘best_err_flip_diff’ [-Wunused-variable]
  10767 |  unsigned int best_err_flip_diff = 255*255*16*3;
        |               ^~~~~~~~~~~~~~~~~~
  etcpack/source/etcpack.cxx:10768:15: warning: unused variable ‘best_err_flip_444’ [-Wunused-variable]
  10768 |  unsigned int best_err_flip_444 = 255*255*16*3;
        |               ^~~~~~~~~~~~~~~~~
  etcpack/source/etcpack.cxx:10774:6: warning: unused variable ‘min_error’ [-Wunused-variable]
  10774 |  int min_error=255*255*8*3;
        |      ^~~~~~~~~
  etcpack/source/etcpack.cxx:10779:15: warning: unused variable ‘pixel_indices1_MSB’ [-Wunused-variable]
  10779 |  unsigned int pixel_indices1_MSB=0;
        |               ^~~~~~~~~~~~~~~~~~
  etcpack/source/etcpack.cxx:10780:15: warning: unused variable ‘pixel_indices1_LSB’ [-Wunused-variable]
  10780 |  unsigned int pixel_indices1_LSB=0;
        |               ^~~~~~~~~~~~~~~~~~
  etcpack/source/etcpack.cxx:10781:15: warning: unused variable ‘pixel_indices2_MSB’ [-Wunused-variable]
  10781 |  unsigned int pixel_indices2_MSB=0;
        |               ^~~~~~~~~~~~~~~~~~
  etcpack/source/etcpack.cxx:10786:15: warning: unused variable ‘pixel_indices2_LSB’ [-Wunused-variable]
  10786 |  unsigned int pixel_indices2_LSB=0;
        |               ^~~~~~~~~~~~~~~~~~
  etcpack/source/etcpack.cxx:10799:15: warning: unused variable ‘table1’ [-Wunused-variable]
  10799 |  unsigned int table1=0, table2=0;
        |               ^~~~~~
  etcpack/source/etcpack.cxx:10799:25: warning: unused variable ‘table2’ [-Wunused-variable]
  10799 |  unsigned int table1=0, table2=0;
        |                         ^~~~~~
  etcpack/source/etcpack.cxx:10872:15: warning: unused variable ‘tryblocks’ [-Wunused-variable]
  10872 |  unsigned int tryblocks = 0;
        |               ^~~~~~~~~
  etcpack/source/etcpack.cxx:10873:15: warning: unused variable ‘allblocks’ [-Wunused-variable]
  10873 |  unsigned int allblocks = 0;
        |               ^~~~~~~~~
  etcpack/source/etcpack.cxx: In function ‘unsigned int compressBlockDifferentialExhaustivePerceptual(uint8*, int, int, int, int, unsigned int&, unsigned int&, unsigned int)’:
  etcpack/source/etcpack.cxx:11048:15: warning: unused variable ‘best_err_norm_diff’ [-Wunused-variable]
  11048 |  unsigned int best_err_norm_diff = MAXERR1000;
        |               ^~~~~~~~~~~~~~~~~~
  etcpack/source/etcpack.cxx:11049:15: warning: unused variable ‘best_err_norm_444’ [-Wunused-variable]
  11049 |  unsigned int best_err_norm_444 = MAXERR1000;
        |               ^~~~~~~~~~~~~~~~~
  etcpack/source/etcpack.cxx:11050:15: warning: unused variable ‘best_err_flip_diff’ [-Wunused-variable]
  11050 |  unsigned int best_err_flip_diff = MAXERR1000;
        |               ^~~~~~~~~~~~~~~~~~
  etcpack/source/etcpack.cxx:11051:15: warning: unused variable ‘best_err_flip_444’ [-Wunused-variable]
  11051 |  unsigned int best_err_flip_444 = MAXERR1000;
        |               ^~~~~~~~~~~~~~~~~
  etcpack/source/etcpack.cxx:11062:15: warning: unused variable ‘pixel_indices1_MSB’ [-Wunused-variable]
  11062 |  unsigned int pixel_indices1_MSB=0;
        |               ^~~~~~~~~~~~~~~~~~
  etcpack/source/etcpack.cxx:11063:15: warning: unused variable ‘pixel_indices1_LSB’ [-Wunused-variable]
  11063 |  unsigned int pixel_indices1_LSB=0;
        |               ^~~~~~~~~~~~~~~~~~
  etcpack/source/etcpack.cxx:11064:15: warning: unused variable ‘pixel_indices2_MSB’ [-Wunused-variable]
  11064 |  unsigned int pixel_indices2_MSB=0;
        |               ^~~~~~~~~~~~~~~~~~
  etcpack/source/etcpack.cxx:11069:15: warning: unused variable ‘pixel_indices2_LSB’ [-Wunused-variable]
  11069 |  unsigned int pixel_indices2_LSB=0;
        |               ^~~~~~~~~~~~~~~~~~
  etcpack/source/etcpack.cxx:11071:15: warning: unused variable ‘table1’ [-Wunused-variable]
  11071 |  unsigned int table1=0, table2=0;
        |               ^~~~~~
  etcpack/source/etcpack.cxx:11071:25: warning: unused variable ‘table2’ [-Wunused-variable]
  11071 |  unsigned int table1=0, table2=0;
        |                         ^~~~~~
  etcpack/source/etcpack.cxx: In function ‘unsigned int compressBlockDifferentialExhaustive(uint8*, int, int, int, int, unsigned int&, unsigned int&, unsigned int)’:
  etcpack/source/etcpack.cxx:11446:15: warning: unused variable ‘best_err_norm_diff’ [-Wunused-variable]
  11446 |  unsigned int best_err_norm_diff = 255*255*16*3;
        |               ^~~~~~~~~~~~~~~~~~
  etcpack/source/etcpack.cxx:11447:15: warning: unused variable ‘best_err_norm_444’ [-Wunused-variable]
  11447 |  unsigned int best_err_norm_444 = 255*255*16*3;
        |               ^~~~~~~~~~~~~~~~~
  etcpack/source/etcpack.cxx:11448:15: warning: unused variable ‘best_err_flip_diff’ [-Wunused-variable]
  11448 |  unsigned int best_err_flip_diff = 255*255*16*3;
        |               ^~~~~~~~~~~~~~~~~~
  etcpack/source/etcpack.cxx:11449:15: warning: unused variable ‘best_err_flip_444’ [-Wunused-variable]
  11449 |  unsigned int best_err_flip_444 = 255*255*16*3;
        |               ^~~~~~~~~~~~~~~~~
  etcpack/source/etcpack.cxx:11455:6: warning: unused variable ‘min_error’ [-Wunused-variable]
  11455 |  int min_error=255*255*8*3;
        |      ^~~~~~~~~
  etcpack/source/etcpack.cxx:11460:15: warning: unused variable ‘pixel_indices1_MSB’ [-Wunused-variable]
  11460 |  unsigned int pixel_indices1_MSB=0;
        |               ^~~~~~~~~~~~~~~~~~
  etcpack/source/etcpack.cxx:11461:15: warning: unused variable ‘pixel_indices1_LSB’ [-Wunused-variable]
  11461 |  unsigned int pixel_indices1_LSB=0;
        |               ^~~~~~~~~~~~~~~~~~
  etcpack/source/etcpack.cxx:11462:15: warning: unused variable ‘pixel_indices2_MSB’ [-Wunused-variable]
  11462 |  unsigned int pixel_indices2_MSB=0;
        |               ^~~~~~~~~~~~~~~~~~
  etcpack/source/etcpack.cxx:11467:15: warning: unused variable ‘pixel_indices2_LSB’ [-Wunused-variable]
  11467 |  unsigned int pixel_indices2_LSB=0;
        |               ^~~~~~~~~~~~~~~~~~
  etcpack/source/etcpack.cxx:11469:15: warning: unused variable ‘table1’ [-Wunused-variable]
  11469 |  unsigned int table1=0, table2=0;
        |               ^~~~~~
  etcpack/source/etcpack.cxx:11469:25: warning: unused variable ‘table2’ [-Wunused-variable]
  11469 |  unsigned int table1=0, table2=0;
        |                         ^~~~~~
  etcpack/source/etcpack.cxx: In function ‘void precalcError59T_col0_Rpercep1000(uint8*, int, unsigned int*)’:
  etcpack/source/etcpack.cxx:12313:15: warning: unused variable ‘block_error’ [-Wunused-variable]
  12313 |  unsigned int block_error = 0,
        |               ^~~~~~~~~~~
  etcpack/source/etcpack.cxx:12314:12: warning: unused variable ‘best_block_error’ [-Wunused-variable]
  12314 |            best_block_error = MAXERR1000,
        |            ^~~~~~~~~~~~~~~~
  etcpack/source/etcpack.cxx: In function ‘void precalcError59T_col0_R(uint8*, int, unsigned int*)’:
  etcpack/source/etcpack.cxx:12362:15: warning: unused variable ‘block_error’ [-Wunused-variable]
  12362 |  unsigned int block_error = 0,
        |               ^~~~~~~~~~~
  etcpack/source/etcpack.cxx:12363:14: warning: unused variable ‘best_block_error’ [-Wunused-variable]
  12363 |              best_block_error = MAXIMUM_ERROR,
        |              ^~~~~~~~~~~~~~~~
  etcpack/source/etcpack.cxx: In function ‘void precalcError59T_col0_RGpercep1000(uint8*, int, unsigned int*)’:
  etcpack/source/etcpack.cxx:12408:15: warning: unused variable ‘block_error’ [-Wunused-variable]
  12408 |  unsigned int block_error = 0,
        |               ^~~~~~~~~~~
  etcpack/source/etcpack.cxx:12409:12: warning: unused variable ‘best_block_error’ [-Wunused-variable]
  12409 |            best_block_error = MAXERR1000,
        |            ^~~~~~~~~~~~~~~~
  etcpack/source/etcpack.cxx: In function ‘void precalcError59T_col0_RG(uint8*, int, unsigned int*)’:
  etcpack/source/etcpack.cxx:12463:15: warning: unused variable ‘block_error’ [-Wunused-variable]
  12463 |  unsigned int block_error = 0,
        |               ^~~~~~~~~~~
  etcpack/source/etcpack.cxx:12464:12: warning: unused variable ‘best_block_error’ [-Wunused-variable]
  12464 |            best_block_error = MAXIMUM_ERROR,
        |            ^~~~~~~~~~~~~~~~
  etcpack/source/etcpack.cxx: In function ‘void precalcError59T_col0_RGBpercep1000(uint8*, int, unsigned int*)’:
  etcpack/source/etcpack.cxx:12607:15: warning: unused variable ‘block_error’ [-Wunused-variable]
  12607 |  unsigned int block_error = 0,
        |               ^~~~~~~~~~~
  etcpack/source/etcpack.cxx:12608:12: warning: unused variable ‘best_block_error’ [-Wunused-variable]
  12608 |            best_block_error = MAXERR1000,
        |            ^~~~~~~~~~~~~~~~
  etcpack/source/etcpack.cxx: In function ‘void precalcError59T_col0_RGB(uint8*, int, unsigned int*)’:
  etcpack/source/etcpack.cxx:12691:15: warning: unused variable ‘block_error’ [-Wunused-variable]
  12691 |  unsigned int block_error = 0,
        |               ^~~~~~~~~~~
  etcpack/source/etcpack.cxx:12692:12: warning: unused variable ‘best_block_error’ [-Wunused-variable]
  12692 |            best_block_error = MAXIMUM_ERROR,
        |            ^~~~~~~~~~~~~~~~
  etcpack/source/etcpack.cxx: In function ‘unsigned int compressBlockTHUMB59TExhaustivePerceptual(uint8*, int, int, int, int, unsigned int&, unsigned int&, unsigned int)’:
  etcpack/source/etcpack.cxx:13479:15: warning: unused variable ‘avoided’ [-Wunused-variable]
  13479 |  unsigned int avoided = 0;
        |               ^~~~~~~
  etcpack/source/etcpack.cxx: In function ‘unsigned int compressBlockTHUMB59TExhaustive(uint8*, int, int, int, int, unsigned int&, unsigned int&, unsigned int)’:
  etcpack/source/etcpack.cxx:13666:15: warning: unused variable ‘avoided’ [-Wunused-variable]
  13666 |  unsigned int avoided = 0;
        |               ^~~~~~~
  etcpack/source/etcpack.cxx: In function ‘void precalcErrorR_58Hperceptual1000(uint8*, int, int, int, uint8 (*)[3], int, unsigned int*)’:
  etcpack/source/etcpack.cxx:13745:6: warning: unused variable ‘best_block_error’ [-Wunused-variable]
  13745 |      best_block_error = MAXERR1000,
        |      ^~~~~~~~~~~~~~~~
  etcpack/source/etcpack.cxx: In function ‘void precalcErrorR_58H(uint8*, int, int, int, uint8 (*)[3], int, unsigned int*)’:
  etcpack/source/etcpack.cxx:13797:6: warning: unused variable ‘best_block_error’ [-Wunused-variable]
  13797 |      best_block_error = MAXIMUM_ERROR,
        |      ^~~~~~~~~~~~~~~~
  etcpack/source/etcpack.cxx: In function ‘void precalcErrorRG_58Hperceptual1000(uint8*, int, int, int, uint8 (*)[3], int, unsigned int*)’:
  etcpack/source/etcpack.cxx:13849:6: warning: unused variable ‘best_block_error’ [-Wunused-variable]
  13849 |      best_block_error = MAXERR1000,
        |      ^~~~~~~~~~~~~~~~
  etcpack/source/etcpack.cxx: In function ‘void precalcErrorRG_58H(uint8*, int, int, int, uint8 (*)[3], int, unsigned int*)’:
  etcpack/source/etcpack.cxx:13905:6: warning: unused variable ‘best_block_error’ [-Wunused-variable]
  13905 |      best_block_error = MAXIMUM_ERROR,
        |      ^~~~~~~~~~~~~~~~
  etcpack/source/etcpack.cxx: In function ‘unsigned int compressBlockTHUMB58HExhaustivePerceptual(uint8*, int, int, int, int, unsigned int&, unsigned int&, unsigned int)’:
  etcpack/source/etcpack.cxx:130:34: warning: result of ‘(2 << 31)’ requires 34 bits to represent, but ‘int’ only has 32 bits [-Wshift-overflow=]
    130 | #define MASK(size, startpos) (((2<<(size-1))-1) << SHIFT(size,startpos))
        |                                 ~^~~~~~~~~~
  etcpack/source/etcpack.cxx:131:63: note: in expansion of macro ‘MASK’
    131 | #define PUTBITS( dest, data, size, startpos) dest = ((dest & ~MASK(size, startpos)) | ((data << SHIFT(size, startpos)) & MASK(size,startpos)))
        |                                                               ^~~~
  etcpack/source/etcpack.cxx:14888:2: note: in expansion of macro ‘PUTBITS’
  14888 |  PUTBITS( compressed2, best_pixel_indices, 32, 31);
        |  ^~~~~~~
  etcpack/source/etcpack.cxx:130:34: warning: result of ‘(2 << 31)’ requires 34 bits to represent, but ‘int’ only has 32 bits [-Wshift-overflow=]
    130 | #define MASK(size, startpos) (((2<<(size-1))-1) << SHIFT(size,startpos))
        |                                 ~^~~~~~~~~~
  etcpack/source/etcpack.cxx:131:122: note: in expansion of macro ‘MASK’
    131 | #define PUTBITS( dest, data, size, startpos) dest = ((dest & ~MASK(size, startpos)) | ((data << SHIFT(size, startpos)) & MASK(size,startpos)))
        |                                                                                                                          ^~~~
  etcpack/source/etcpack.cxx:14888:2: note: in expansion of macro ‘PUTBITS’
  14888 |  PUTBITS( compressed2, best_pixel_indices, 32, 31);
        |  ^~~~~~~
  etcpack/source/etcpack.cxx:14791:6: warning: unused variable ‘trycols’ [-Wunused-variable]
  14791 |  int trycols = 0;
        |      ^~~~~~~
  etcpack/source/etcpack.cxx:14792:6: warning: unused variable ‘allcols’ [-Wunused-variable]
  14792 |  int allcols = 0;
        |      ^~~~~~~
  etcpack/source/etcpack.cxx: In function ‘unsigned int compressBlockTHUMB58HExhaustive(uint8*, int, int, int, int, unsigned int&, unsigned int&, unsigned int)’:
  etcpack/source/etcpack.cxx:130:34: warning: result of ‘(2 << 31)’ requires 34 bits to represent, but ‘int’ only has 32 bits [-Wshift-overflow=]
    130 | #define MASK(size, startpos) (((2<<(size-1))-1) << SHIFT(size,startpos))
        |                                 ~^~~~~~~~~~
  etcpack/source/etcpack.cxx:131:63: note: in expansion of macro ‘MASK’
    131 | #define PUTBITS( dest, data, size, startpos) dest = ((dest & ~MASK(size, startpos)) | ((data << SHIFT(size, startpos)) & MASK(size,startpos)))
        |                                                               ^~~~
  etcpack/source/etcpack.cxx:15099:2: note: in expansion of macro ‘PUTBITS’
  15099 |  PUTBITS( compressed2, best_pixel_indices, 32, 31);
        |  ^~~~~~~
  etcpack/source/etcpack.cxx:130:34: warning: result of ‘(2 << 31)’ requires 34 bits to represent, but ‘int’ only has 32 bits [-Wshift-overflow=]
    130 | #define MASK(size, startpos) (((2<<(size-1))-1) << SHIFT(size,startpos))
        |                                 ~^~~~~~~~~~
  etcpack/source/etcpack.cxx:131:122: note: in expansion of macro ‘MASK’
    131 | #define PUTBITS( dest, data, size, startpos) dest = ((dest & ~MASK(size, startpos)) | ((data << SHIFT(size, startpos)) & MASK(size,startpos)))
        |                                                                                                                          ^~~~
  etcpack/source/etcpack.cxx:15099:2: note: in expansion of macro ‘PUTBITS’
  15099 |  PUTBITS( compressed2, best_pixel_indices, 32, 31);
        |  ^~~~~~~
  etcpack/source/etcpack.cxx:15002:6: warning: unused variable ‘trycols’ [-Wunused-variable]
  15002 |  int trycols = 0;
        |      ^~~~~~~
  etcpack/source/etcpack.cxx:15003:6: warning: unused variable ‘allcols’ [-Wunused-variable]
  15003 |  int allcols = 0;
        |      ^~~~~~~
  etcpack/source/etcpack.cxx: In function ‘void compressImageFile(uint8*, uint8*, int, int, char*, int, int)’:
  etcpack/source/etcpack.cxx:15573:6: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
  15573 |  if(f=fopen(dstfile,"wb"))
        |     ~^~~~~~~~~~~~~~~~~~~~
  etcpack/source/etcpack.cxx: In function ‘void compressFile(char*, char*)’:
  etcpack/source/etcpack.cxx:15886:6: warning: unused variable ‘tstart’ [-Wunused-variable]
  15886 |  int tstart;
        |      ^~~~~~
  etcpack/source/etcpack.cxx:15887:6: warning: unused variable ‘tstop’ [-Wunused-variable]
  15887 |  int tstop;
        |      ^~~~~
  etcpack/source/etcpack.cxx: In function ‘int main(int, char**)’:
  etcpack/source/etcpack.cxx:16025:7: warning: unused variable ‘q’ [-Wunused-variable]
  16025 |   int q = find_pos_of_extension(srcfile);
        |       ^
  etcpack/source/etcpack.cxx:16026:7: warning: unused variable ‘q2’ [-Wunused-variable]
  16026 |   int q2 = find_pos_of_extension(dstfile);
        |       ^~
  etcpack/source/etcpack.cxx: At global scope:
  etcpack/source/etcpack.cxx:222:12: warning: ‘unscramble’ defined but not used [-Wunused-variable]
    222 | static int unscramble[4] = {2, 3, 1, 0};
        |            ^~~~~~~~~~
  error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
  
  ----------------------------------------
  Failed building wheel for etcpack
  Running setup.py clean for etcpack
Failed to build etcpack
Installing collected packages: etcpack
  Running setup.py install for etcpack ... error
    Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-9xi2kuyx/etcpack/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-71jbq1db/install-record.txt --single-version-externally-managed --compile --user --prefix=:
    running install
    running build
    running build_ext
    building 'etcpack' extension
    creating build
    creating build/temp.linux-x86_64-3.7
    creating build/temp.linux-x86_64-3.7/etcpack
    creating build/temp.linux-x86_64-3.7/etcpack/source
    x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Ietcpack/source -I/usr/include/python3.7m -c etcpack.cpp -o build/temp.linux-x86_64-3.7/etcpack.o
    etcpack.cpp: In function ‘PyObject* __pyx_pw_7etcpack_11ETC2Decoder_3_unpack_etc(PyObject*, PyObject*, PyObject*)’:
    etcpack.cpp:4002:42: warning: ‘__pyx_v_newalphaimg’ may be used uninitialized in this function [-Wmaybe-uninitialized]
     4002 |           (__pyx_v_newalphaimg[__pyx_t_19]) = (__pyx_v_alphaimg[__pyx_t_18]);
          |                                          ^
    etcpack.cpp:1990:10: note: ‘__pyx_v_newalphaimg’ was declared here
     1990 |   uint8 *__pyx_v_newalphaimg;
          |          ^~~~~~~~~~~~~~~~~~~
    etcpack.cpp:4106:11: warning: ‘__pyx_v_alphaimg’ may be used uninitialized in this function [-Wmaybe-uninitialized]
     4106 |       free(__pyx_v_alphaimg);
          |       ~~~~^~~~~~~~~~~~~~~~~~
    etcpack.cpp:1987:10: note: ‘__pyx_v_alphaimg’ was declared here
     1987 |   uint8 *__pyx_v_alphaimg;
          |          ^~~~~~~~~~~~~~~~
    etcpack.cpp:2900:34: warning: ‘__pyx_v_alphaimg2’ may be used uninitialized in this function [-Wmaybe-uninitialized]
     2900 |         decompressBlockAlpha16bit(__pyx_v_alphablock, __pyx_v_alphaimg2, __pyx_v_width, __pyx_v_height, __pyx_t_7, __pyx_t_15);
          |         ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    etcpack.cpp:1988:10: note: ‘__pyx_v_alphaimg2’ was declared here
     1988 |   uint8 *__pyx_v_alphaimg2;
          |          ^~~~~~~~~~~~~~~~~
    x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Ietcpack/source -I/usr/include/python3.7m -c etcpack/source/image.cxx -o build/temp.linux-x86_64-3.7/etcpack/source/image.o
    etcpack/source/image.cxx:54: warning: ignoring #pragma warning  [-Wunknown-pragmas]
       54 | #pragma warning(disable : 4996)
          |
    etcpack/source/image.cxx:56: warning: ignoring #pragma warning  [-Wunknown-pragmas]
       56 | #pragma warning(disable : 4244)
          |
    etcpack/source/image.cxx: In function ‘bool fReadPPM(char*, int&, int&, unsigned char*&, int)’:
    etcpack/source/image.cxx:121:20: warning: format ‘%s’ expects a matching ‘char*’ argument [-Wformat=]
      121 |    printf("Error: %s is not binary\n");
          |                   ~^
          |                    |
          |                    char*
    x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Ietcpack/source -I/usr/include/python3.7m -c etcpack/source/etcpack.cxx -o build/temp.linux-x86_64-3.7/etcpack/source/etcpack.o
    etcpack/source/etcpack.cxx:96: warning: ignoring #pragma warning  [-Wunknown-pragmas]
       96 | #pragma warning(disable : 4996)
          |
    etcpack/source/etcpack.cxx:98: warning: ignoring #pragma warning  [-Wunknown-pragmas]
       98 | #pragma warning(disable : 4244)
          |
    etcpack/source/etcpack.cxx:162:1: error: a storage class can only be specified for objects and functions
      162 | static enum{PATTERN_H = 0,
          | ^~~~~~
    etcpack/source/etcpack.cxx:165:1: error: a storage class can only be specified for objects and functions
      165 | static enum{MODE_ETC1, MODE_THUMB_T, MODE_THUMB_H, MODE_PLANAR};
          | ^~~~~~
    etcpack/source/etcpack.cxx:205:1: error: a storage class can only be specified for objects and functions
      205 | static enum{ETC1_RGB_NO_MIPMAPS,ETC2PACKAGE_RGB_NO_MIPMAPS,ETC2PACKAGE_RGBA_NO_MIPMAPS_OLD,ETC2PACKAGE_RGBA_NO_MIPMAPS,ETC2PACKAGE_RGBA1_NO_MIPMAPS,ETC2PACKAGE_R_NO_MIPMAPS,ETC2PACKAGE_RG_NO_MIPMAPS,ETC2PACKAGE_R_SIGNED_NO_MIPMAPS,ETC2PACKAGE_RG_SIGNED_NO_MIPMAPS,ETC2PACKAGE_sRGB_NO_MIPMAPS,ETC2PACKAGE_sRGBA_NO_MIPMAPS,ETC2PACKAGE_sRGBA1_NO_MIPMAPS};
          | ^~~~~~
    etcpack/source/etcpack.cxx:206:1: error: a storage class can only be specified for objects and functions
      206 | static enum {MODE_COMPRESS, MODE_UNCOMPRESS, MODE_PSNR};
          | ^~~~~~
    etcpack/source/etcpack.cxx:207:1: error: a storage class can only be specified for objects and functions
      207 | static enum {SPEED_SLOW, SPEED_FAST, SPEED_MEDIUM};
          | ^~~~~~
    etcpack/source/etcpack.cxx:208:1: error: a storage class can only be specified for objects and functions
      208 | static enum {METRIC_PERCEPTUAL, METRIC_NONPERCEPTUAL};
          | ^~~~~~
    etcpack/source/etcpack.cxx:209:1: error: a storage class can only be specified for objects and functions
      209 | static enum {CODEC_ETC, CODEC_ETC2};
          | ^~~~~~
    etcpack/source/etcpack.cxx:247:1: error: a storage class can only be specified for objects and functions
      247 | static enum {GL_R=0x1903,GL_RG=0x8227,GL_RGB=0x1907,GL_RGBA=0x1908};
          | ^~~~~~
    etcpack/source/etcpack.cxx: In function ‘bool readSrcFile(char*, uint8*&, int&, int&, int&, int&)’:
    etcpack/source/etcpack.cxx:462:15: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
      462 |  if(fileExist("tmp.ppm"))
          |               ^~~~~~~~~
    etcpack/source/etcpack.cxx:473:10: warning: too many arguments for format [-Wformat-extra-args]
      473 |   printf("Copying source file to tmp.ppm\n", filename);
          |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    etcpack/source/etcpack.cxx:494:14: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
      494 |  if(fReadPPM("tmp.ppm",w1,h1,img,bitrate))
          |              ^~~~~~~~~
    etcpack/source/etcpack.cxx: In function ‘bool readSrcFileNoExpand(char*, uint8*&, int&, int&)’:
    etcpack/source/etcpack.cxx:560:15: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
      560 |  if(fileExist("tmp.ppm"))
          |               ^~~~~~~~~
    etcpack/source/etcpack.cxx:572:10: warning: too many arguments for format [-Wformat-extra-args]
      572 |   printf("Copying source file to tmp.ppm\n", filename);
          |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    etcpack/source/etcpack.cxx:590:14: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
      590 |  if(fReadPPM("tmp.ppm",w1,h1,img,8))
          |              ^~~~~~~~~
    etcpack/source/etcpack.cxx: In function ‘void readArguments(int, char**, char*, char*)’:
    etcpack/source/etcpack.cxx:617:37: warning: format ‘%s’ expects a matching ‘char*’ argument [-Wformat=]
      617 |     printf("flag missing argument: %s!\n");
          |                                    ~^
          |                                     |
          |                                     char*
    etcpack/source/etcpack.cxx: In function ‘void quantize444ColorCombined(float*, int*, uint8*)’:
    etcpack/source/etcpack.cxx:1578:8: warning: unused variable ‘min_error’ [-Wunused-variable]
     1578 |  float min_error=255*255*8*3;
          |        ^~~~~~~~~
    etcpack/source/etcpack.cxx:1580:15: warning: unused variable ‘best_table’ [-Wunused-variable]
     1580 |  unsigned int best_table=0;
          |               ^~~~~~~~~~
    etcpack/source/etcpack.cxx:1581:15: warning: unused variable ‘best_index’ [-Wunused-variable]
     1581 |  unsigned int best_index=0;
          |               ^~~~~~~~~~
    etcpack/source/etcpack.cxx:1654:9: warning: unused variable ‘drh’ [-Wunused-variable]
     1654 |   float drh = red_high-red_average;
          |         ^~~
    etcpack/source/etcpack.cxx:1655:8: warning: unused variable ‘dgh’ [-Wunused-variable]
     1655 |  float dgh = green_high-green_average;
          |        ^~~
    etcpack/source/etcpack.cxx:1656:8: warning: unused variable ‘dbh’ [-Wunused-variable]
     1656 |  float dbh = blue_high-blue_average;
          |        ^~~
    etcpack/source/etcpack.cxx: In function ‘void quantize555ColorCombined(float*, int*, uint8*)’:
    etcpack/source/etcpack.cxx:1753:8: warning: unused variable ‘min_error’ [-Wunused-variable]
     1753 |  float min_error=255*255*8*3;
          |        ^~~~~~~~~
    etcpack/source/etcpack.cxx:1755:15: warning: unused variable ‘best_table’ [-Wunused-variable]
     1755 |  unsigned int best_table=0;
          |               ^~~~~~~~~~
    etcpack/source/etcpack.cxx:1756:15: warning: unused variable ‘best_index’ [-Wunused-variable]
     1756 |  unsigned int best_index=0;
          |               ^~~~~~~~~~
    etcpack/source/etcpack.cxx:1829:9: warning: unused variable ‘drh’ [-Wunused-variable]
     1829 |   float drh = red_high-red_average;
          |         ^~~
    etcpack/source/etcpack.cxx:1830:8: warning: unused variable ‘dgh’ [-Wunused-variable]
     1830 |  float dgh = green_high-green_average;
          |        ^~~
    etcpack/source/etcpack.cxx:1831:8: warning: unused variable ‘dbh’ [-Wunused-variable]
     1831 |  float dbh = blue_high-blue_average;
          |        ^~~
    etcpack/source/etcpack.cxx: In function ‘void quantize444ColorCombinedPerceptual(float*, int*, uint8*)’:
    etcpack/source/etcpack.cxx:1908:8: warning: unused variable ‘min_error’ [-Wunused-variable]
     1908 |  float min_error=255*255*8*3;
          |        ^~~~~~~~~
    etcpack/source/etcpack.cxx:1910:15: warning: unused variable ‘best_table’ [-Wunused-variable]
     1910 |  unsigned int best_table=0;
          |               ^~~~~~~~~~
    etcpack/source/etcpack.cxx:1911:15: warning: unused variable ‘best_index’ [-Wunused-variable]
     1911 |  unsigned int best_index=0;
          |               ^~~~~~~~~~
    etcpack/source/etcpack.cxx:1992:9: warning: unused variable ‘drh’ [-Wunused-variable]
     1992 |   float drh = red_high-red_average;
          |         ^~~
    etcpack/source/etcpack.cxx:1993:8: warning: unused variable ‘dgh’ [-Wunused-variable]
     1993 |  float dgh = green_high-green_average;
          |        ^~~
    etcpack/source/etcpack.cxx:1994:8: warning: unused variable ‘dbh’ [-Wunused-variable]
     1994 |  float dbh = blue_high-blue_average;
          |        ^~~
    etcpack/source/etcpack.cxx: In function ‘void quantize555ColorCombinedPerceptual(float*, int*, uint8*)’:
    etcpack/source/etcpack.cxx:2062:8: warning: unused variable ‘min_error’ [-Wunused-variable]
     2062 |  float min_error=255*255*8*3;
          |        ^~~~~~~~~
    etcpack/source/etcpack.cxx:2064:15: warning: unused variable ‘best_table’ [-Wunused-variable]
     2064 |  unsigned int best_table=0;
          |               ^~~~~~~~~~
    etcpack/source/etcpack.cxx:2065:15: warning: unused variable ‘best_index’ [-Wunused-variable]
     2065 |  unsigned int best_index=0;
          |               ^~~~~~~~~~
    etcpack/source/etcpack.cxx:2146:9: warning: unused variable ‘drh’ [-Wunused-variable]
     2146 |   float drh = red_high-red_average;
          |         ^~~
    etcpack/source/etcpack.cxx:2147:8: warning: unused variable ‘dgh’ [-Wunused-variable]
     2147 |  float dgh = green_high-green_average;
          |        ^~~
    etcpack/source/etcpack.cxx:2148:8: warning: unused variable ‘dbh’ [-Wunused-variable]
     2148 |  float dbh = blue_high-blue_average;
          |        ^~~
    etcpack/source/etcpack.cxx: In function ‘unsigned int compressBlockOnlyIndividualAveragePerceptual1000(uint8*, int, int, int, int, unsigned int&, unsigned int&, int*, int*, int&, unsigned int&, unsigned int&, unsigned int&, unsigned int&, int*, int*, int*, int*)’:
    etcpack/source/etcpack.cxx:2212:15: warning: unused variable ‘best_table_indices1’ [-Wunused-variable]
     2212 |  unsigned int best_table_indices1=0, best_table_indices2=0;
          |               ^~~~~~~~~~~~~~~~~~~
    etcpack/source/etcpack.cxx:2212:38: warning: unused variable ‘best_table_indices2’ [-Wunused-variable]
     2212 |  unsigned int best_table_indices1=0, best_table_indices2=0;
          |                                      ^~~~~~~~~~~~~~~~~~~
    etcpack/source/etcpack.cxx: In function ‘int compressBlockOnlyIndividualAverage(uint8*, int, int, int, int, unsigned int&, unsigned int&, int*, int*, int&, unsigned int&, unsigned int&, unsigned int&, unsigned int&, int*, int*, int*, int*)’:
    etcpack/source/etcpack.cxx:2410:6: warning: unused variable ‘min_error’ [-Wunused-variable]
     2410 |  int min_error=255*255*8*3;
          |      ^~~~~~~~~
    etcpack/source/etcpack.cxx:2411:15: warning: unused variable ‘best_table_indices1’ [-Wunused-variable]
     2411 |  unsigned int best_table_indices1=0, best_table_indices2=0;
          |               ^~~~~~~~~~~~~~~~~~~
    etcpack/source/etcpack.cxx:2411:38: warning: unused variable ‘best_table_indices2’ [-Wunused-variable]
     2411 |  unsigned int best_table_indices1=0, best_table_indices2=0;
          |                                      ^~~~~~~~~~~~~~~~~~~
    etcpack/source/etcpack.cxx: In function ‘void compressBlockDiffFlipAverage(uint8*, int, int, int, int, unsigned int&, unsigned int&)’:
    etcpack/source/etcpack.cxx:2611:6: warning: unused variable ‘min_error’ [-Wunused-variable]
     2611 |  int min_error=255*255*8*3;
          |      ^~~~~~~~~
    etcpack/source/etcpack.cxx:2612:15: warning: unused variable ‘best_table_indices1’ [-Wunused-variable]
     2612 |  unsigned int best_table_indices1=0, best_table_indices2=0;
          |               ^~~~~~~~~~~~~~~~~~~
    etcpack/source/etcpack.cxx:2612:38: warning: unused variable ‘best_table_indices2’ [-Wunused-variable]
     2612 |  unsigned int best_table_indices1=0, best_table_indices2=0;
          |                                      ^~~~~~~~~~~~~~~~~~~
    etcpack/source/etcpack.cxx: In function ‘int compressBlockOnlyDiffFlipAverage(uint8*, int, int, int, int, unsigned int&, unsigned int&, int*, int*, int&)’:
    etcpack/source/etcpack.cxx:2928:6: warning: unused variable ‘min_error’ [-Wunused-variable]
     2928 |  int min_error=255*255*8*3;
          |      ^~~~~~~~~
    etcpack/source/etcpack.cxx:2929:15: warning: unused variable ‘best_table_indices1’ [-Wunused-variable]
     2929 |  unsigned int best_table_indices1=0, best_table_indices2=0;
          |               ^~~~~~~~~~~~~~~~~~~
    etcpack/source/etcpack.cxx:2929:38: warning: unused variable ‘best_table_indices2’ [-Wunused-variable]
     2929 |  unsigned int best_table_indices1=0, best_table_indices2=0;
          |                                      ^~~~~~~~~~~~~~~~~~~
    etcpack/source/etcpack.cxx: In function ‘unsigned int compressBlockOnlyDiffFlipAveragePerceptual1000(uint8*, int, int, int, int, unsigned int&, unsigned int&)’:
    etcpack/source/etcpack.cxx:3163:15: warning: unused variable ‘min_error’ [-Wunused-variable]
     3163 |  unsigned int min_error=MAXERR1000;
          |               ^~~~~~~~~
    etcpack/source/etcpack.cxx:3164:15: warning: unused variable ‘best_table_indices1’ [-Wunused-variable]
     3164 |  unsigned int best_table_indices1=0, best_table_indices2=0;
          |               ^~~~~~~~~~~~~~~~~~~
    etcpack/source/etcpack.cxx:3164:38: warning: unused variable ‘best_table_indices2’ [-Wunused-variable]
     3164 |  unsigned int best_table_indices1=0, best_table_indices2=0;
          |                                      ^~~~~~~~~~~~~~~~~~~
    etcpack/source/etcpack.cxx: In function ‘double compressBlockDiffFlipAveragePerceptual(uint8*, int, int, int, int, unsigned int&, unsigned int&)’:
    etcpack/source/etcpack.cxx:3385:6: warning: unused variable ‘min_error’ [-Wunused-variable]
     3385 |  int min_error=255*255*8*3;
          |      ^~~~~~~~~
    etcpack/source/etcpack.cxx:3386:15: warning: unused variable ‘best_table_indices1’ [-Wunused-variable]
     3386 |  unsigned int best_table_indices1=0, best_table_indices2=0;
          |               ^~~~~~~~~~~~~~~~~~~
    etcpack/source/etcpack.cxx:3386:38: warning: unused variable ‘best_table_indices2’ [-Wunused-variable]
     3386 |  unsigned int best_table_indices1=0, best_table_indices2=0;
          |                                      ^~~~~~~~~~~~~~~~~~~
    etcpack/source/etcpack.cxx: In function ‘void stuff57bits(unsigned int, unsigned int, unsigned int&, unsigned int&)’:
    etcpack/source/etcpack.cxx:4517:19: warning: suggest parentheses around operand of ‘!’ or change ‘&’ to ‘&&’ or ‘!’ to ‘~’ [-Wparentheses]
     4517 |  bit = (a & c) | (!a & b & c & d) | (a & b & !c & d);
          |                   ^~
    etcpack/source/etcpack.cxx: In function ‘void stuff58bits(unsigned int, unsigned int, unsigned int&, unsigned int&)’:
    etcpack/source/etcpack.cxx:4597:19: warning: suggest parentheses around operand of ‘!’ or change ‘&’ to ‘&&’ or ‘!’ to ‘~’ [-Wparentheses]
     4597 |  bit = (a & c) | (!a & b & c & d) | (a & b & !c & d);
          |                   ^~
    etcpack/source/etcpack.cxx: In function ‘void stuff58bitsDiffFalse(unsigned int, unsigned int, unsigned int&, unsigned int&)’:
    etcpack/source/etcpack.cxx:4637:19: warning: suggest parentheses around operand of ‘!’ or change ‘&’ to ‘&&’ or ‘!’ to ‘~’ [-Wparentheses]
     4637 |  bit = (a & c) | (!a & b & c & d) | (a & b & !c & d);
          |                   ^~
    etcpack/source/etcpack.cxx: In function ‘void stuff59bits(unsigned int, unsigned int, unsigned int&, unsigned int&)’:
    etcpack/source/etcpack.cxx:4699:19: warning: suggest parentheses around operand of ‘!’ or change ‘&’ to ‘&&’ or ‘!’ to ‘~’ [-Wparentheses]
     4699 |  bit = (a & c) | (!a & b & c & d) | (a & b & !c & d);
          |                   ^~
    etcpack/source/etcpack.cxx: In function ‘void compressBlockDiffFlipCombined(uint8*, int, int, int, int, unsigned int&, unsigned int&)’:
    etcpack/source/etcpack.cxx:4776:6: warning: unused variable ‘min_error’ [-Wunused-variable]
     4776 |  int min_error=255*255*8*3;
          |      ^~~~~~~~~
    etcpack/source/etcpack.cxx:4777:15: warning: unused variable ‘best_table_indices1’ [-Wunused-variable]
     4777 |  unsigned int best_table_indices1=0, best_table_indices2=0;
          |               ^~~~~~~~~~~~~~~~~~~
    etcpack/source/etcpack.cxx:4777:38: warning: unused variable ‘best_table_indices2’ [-Wunused-variable]
     4777 |  unsigned int best_table_indices1=0, best_table_indices2=0;
          |                                      ^~~~~~~~~~~~~~~~~~~
    etcpack/source/etcpack.cxx: In function ‘void computeColorLBGHalfIntensityFast(uint8*, int, int, int, uint8 (*)[3])’:
    etcpack/source/etcpack.cxx:5081:45: warning: unused variable ‘eps’ [-Wunused-variable]
     5081 |  double D = 0, oldD, bestD = MAXIMUM_ERROR, eps = 0.0000000001;
          |                                             ^~~
    etcpack/source/etcpack.cxx: In function ‘void computeColorLBGNotIntensityFast(uint8*, int, int, int, uint8 (*)[3])’:
    etcpack/source/etcpack.cxx:5275:45: warning: unused variable ‘eps’ [-Wunused-variable]
     5275 |  double D = 0, oldD, bestD = MAXIMUM_ERROR, eps = 0.0000000001;
          |                                             ^~~
    etcpack/source/etcpack.cxx: In function ‘void computeColorLBGNotIntensity(uint8*, int, int, int, uint8 (*)[3])’:
    etcpack/source/etcpack.cxx:5467:45: warning: unused variable ‘eps’ [-Wunused-variable]
     5467 |  double D = 0, oldD, bestD = MAXIMUM_ERROR, eps = 0.0000000001;
          |                                             ^~~
    etcpack/source/etcpack.cxx: In function ‘void computeColorLBG(uint8*, int, int, int, uint8 (*)[3])’:
    etcpack/source/etcpack.cxx:5659:45: warning: unused variable ‘eps’ [-Wunused-variable]
     5659 |  double D = 0, oldD, bestD = MAXIMUM_ERROR, eps = 0.0000000001;
          |                                             ^~~
    etcpack/source/etcpack.cxx: In function ‘void computeColorLBGfast(uint8*, int, int, int, uint8 (*)[3])’:
    etcpack/source/etcpack.cxx:5839:45: warning: unused variable ‘eps’ [-Wunused-variable]
     5839 |  double D = 0, oldD, bestD = MAXIMUM_ERROR, eps = 0.0000000001;
          |                                             ^~~
    etcpack/source/etcpack.cxx: In function ‘void packBlock59T(uint8 (*)[3], uint8, unsigned int, unsigned int&, unsigned int&)’:
    etcpack/source/etcpack.cxx:130:34: warning: result of ‘(2 << 31)’ requires 34 bits to represent, but ‘int’ only has 32 bits [-Wshift-overflow=]
      130 | #define MASK(size, startpos) (((2<<(size-1))-1) << SHIFT(size,startpos))
          |                                 ~^~~~~~~~~~
    etcpack/source/etcpack.cxx:131:63: note: in expansion of macro ‘MASK’
      131 | #define PUTBITS( dest, data, size, startpos) dest = ((dest & ~MASK(size, startpos)) | ((data << SHIFT(size, startpos)) & MASK(size,startpos)))
          |                                                               ^~~~
    etcpack/source/etcpack.cxx:6392:2: note: in expansion of macro ‘PUTBITS’
     6392 |  PUTBITS( compressed2, pixel_indices, 32, 31);
          |  ^~~~~~~
    etcpack/source/etcpack.cxx:130:34: warning: result of ‘(2 << 31)’ requires 34 bits to represent, but ‘int’ only has 32 bits [-Wshift-overflow=]
      130 | #define MASK(size, startpos) (((2<<(size-1))-1) << SHIFT(size,startpos))
          |                                 ~^~~~~~~~~~
    etcpack/source/etcpack.cxx:131:122: note: in expansion of macro ‘MASK’
      131 | #define PUTBITS( dest, data, size, startpos) dest = ((dest & ~MASK(size, startpos)) | ((data << SHIFT(size, startpos)) & MASK(size,startpos)))
          |                                                                                                                          ^~~~
    etcpack/source/etcpack.cxx:6392:2: note: in expansion of macro ‘PUTBITS’
     6392 |  PUTBITS( compressed2, pixel_indices, 32, 31);
          |  ^~~~~~~
    etcpack/source/etcpack.cxx: In function ‘unsigned int compressBlockTHUMB58HFastestPerceptual1000(uint8*, int, int, int, int, unsigned int&, unsigned int&)’:
    etcpack/source/etcpack.cxx:130:34: warning: result of ‘(2 << 31)’ requires 34 bits to represent, but ‘int’ only has 32 bits [-Wshift-overflow=]
      130 | #define MASK(size, startpos) (((2<<(size-1))-1) << SHIFT(size,startpos))
          |                                 ~^~~~~~~~~~
    etcpack/source/etcpack.cxx:131:63: note: in expansion of macro ‘MASK’
      131 | #define PUTBITS( dest, data, size, startpos) dest = ((dest & ~MASK(size, startpos)) | ((data << SHIFT(size, startpos)) & MASK(size,startpos)))
          |                                                               ^~~~
    etcpack/source/etcpack.cxx:6985:2: note: in expansion of macro ‘PUTBITS’
     6985 |  PUTBITS( compressed2, best_pixel_indices, 32, 31);
          |  ^~~~~~~
    etcpack/source/etcpack.cxx:130:34: warning: result of ‘(2 << 31)’ requires 34 bits to represent, but ‘int’ only has 32 bits [-Wshift-overflow=]
      130 | #define MASK(size, startpos) (((2<<(size-1))-1) << SHIFT(size,startpos))
          |                                 ~^~~~~~~~~~
    etcpack/source/etcpack.cxx:131:122: note: in expansion of macro ‘MASK’
      131 | #define PUTBITS( dest, data, size, startpos) dest = ((dest & ~MASK(size, startpos)) | ((data << SHIFT(size, startpos)) & MASK(size,startpos)))
          |                                                                                                                          ^~~~
    etcpack/source/etcpack.cxx:6985:2: note: in expansion of macro ‘PUTBITS’
     6985 |  PUTBITS( compressed2, best_pixel_indices, 32, 31);
          |  ^~~~~~~
    etcpack/source/etcpack.cxx: In function ‘double compressBlockTHUMB58HFastest(uint8*, int, int, int, int, unsigned int&, unsigned int&)’:
    etcpack/source/etcpack.cxx:130:34: warning: result of ‘(2 << 31)’ requires 34 bits to represent, but ‘int’ only has 32 bits [-Wshift-overflow=]
      130 | #define MASK(size, startpos) (((2<<(size-1))-1) << SHIFT(size,startpos))
          |                                 ~^~~~~~~~~~
    etcpack/source/etcpack.cxx:131:63: note: in expansion of macro ‘MASK’
      131 | #define PUTBITS( dest, data, size, startpos) dest = ((dest & ~MASK(size, startpos)) | ((data << SHIFT(size, startpos)) & MASK(size,startpos)))
          |                                                               ^~~~
    etcpack/source/etcpack.cxx:7062:2: note: in expansion of macro ‘PUTBITS’
     7062 |  PUTBITS( compressed2, best_pixel_indices, 32, 31);
          |  ^~~~~~~
    etcpack/source/etcpack.cxx:130:34: warning: result of ‘(2 << 31)’ requires 34 bits to represent, but ‘int’ only has 32 bits [-Wshift-overflow=]
      130 | #define MASK(size, startpos) (((2<<(size-1))-1) << SHIFT(size,startpos))
          |                                 ~^~~~~~~~~~
    etcpack/source/etcpack.cxx:131:122: note: in expansion of macro ‘MASK’
      131 | #define PUTBITS( dest, data, size, startpos) dest = ((dest & ~MASK(size, startpos)) | ((data << SHIFT(size, startpos)) & MASK(size,startpos)))
          |                                                                                                                          ^~~~
    etcpack/source/etcpack.cxx:7062:2: note: in expansion of macro ‘PUTBITS’
     7062 |  PUTBITS( compressed2, best_pixel_indices, 32, 31);
          |  ^~~~~~~
    etcpack/source/etcpack.cxx: In function ‘double compressBlockTHUMB58HAlpha(uint8*, uint8*, int, int, int, int, unsigned int&, unsigned int&)’:
    etcpack/source/etcpack.cxx:130:34: warning: result of ‘(2 << 31)’ requires 34 bits to represent, but ‘int’ only has 32 bits [-Wshift-overflow=]
      130 | #define MASK(size, startpos) (((2<<(size-1))-1) << SHIFT(size,startpos))
          |                                 ~^~~~~~~~~~
    etcpack/source/etcpack.cxx:131:63: note: in expansion of macro ‘MASK’
      131 | #define PUTBITS( dest, data, size, startpos) dest = ((dest & ~MASK(size, startpos)) | ((data << SHIFT(size, startpos)) & MASK(size,startpos)))
          |                                                               ^~~~
    etcpack/source/etcpack.cxx:7126:2: note: in expansion of macro ‘PUTBITS’
     7126 |  PUTBITS( compressed2, best_pixel_indices, 32, 31);
          |  ^~~~~~~
    etcpack/source/etcpack.cxx:130:34: warning: result of ‘(2 << 31)’ requires 34 bits to represent, but ‘int’ only has 32 bits [-Wshift-overflow=]
      130 | #define MASK(size, startpos) (((2<<(size-1))-1) << SHIFT(size,startpos))
          |                                 ~^~~~~~~~~~
    etcpack/source/etcpack.cxx:131:122: note: in expansion of macro ‘MASK’
      131 | #define PUTBITS( dest, data, size, startpos) dest = ((dest & ~MASK(size, startpos)) | ((data << SHIFT(size, startpos)) & MASK(size,startpos)))
          |                                                                                                                          ^~~~
    etcpack/source/etcpack.cxx:7126:2: note: in expansion of macro ‘PUTBITS’
     7126 |  PUTBITS( compressed2, best_pixel_indices, 32, 31);
          |  ^~~~~~~
    etcpack/source/etcpack.cxx: In function ‘double compressBlockTHUMB58HFast(uint8*, int, int, int, int, unsigned int&, unsigned int&)’:
    etcpack/source/etcpack.cxx:130:34: warning: result of ‘(2 << 31)’ requires 34 bits to represent, but ‘int’ only has 32 bits [-Wshift-overflow=]
      130 | #define MASK(size, startpos) (((2<<(size-1))-1) << SHIFT(size,startpos))
          |                                 ~^~~~~~~~~~
    etcpack/source/etcpack.cxx:131:63: note: in expansion of macro ‘MASK’
      131 | #define PUTBITS( dest, data, size, startpos) dest = ((dest & ~MASK(size, startpos)) | ((data << SHIFT(size, startpos)) & MASK(size,startpos)))
          |                                                               ^~~~
    etcpack/source/etcpack.cxx:7240:2: note: in expansion of macro ‘PUTBITS’
     7240 |  PUTBITS( compressed2, best_pixel_indices, 32, 31);
          |  ^~~~~~~
    etcpack/source/etcpack.cxx:130:34: warning: result of ‘(2 << 31)’ requires 34 bits to represent, but ‘int’ only has 32 bits [-Wshift-overflow=]
      130 | #define MASK(size, startpos) (((2<<(size-1))-1) << SHIFT(size,startpos))
          |                                 ~^~~~~~~~~~
    etcpack/source/etcpack.cxx:131:122: note: in expansion of macro ‘MASK’
      131 | #define PUTBITS( dest, data, size, startpos) dest = ((dest & ~MASK(size, startpos)) | ((data << SHIFT(size, startpos)) & MASK(size,startpos)))
          |                                                                                                                          ^~~~
    etcpack/source/etcpack.cxx:7240:2: note: in expansion of macro ‘PUTBITS’
     7240 |  PUTBITS( compressed2, best_pixel_indices, 32, 31);
          |  ^~~~~~~
    etcpack/source/etcpack.cxx: In function ‘void compressBlockDiffFlipCombinedPerceptual(uint8*, int, int, int, int, unsigned int&, unsigned int&)’:
    etcpack/source/etcpack.cxx:7259:6: warning: unused variable ‘min_error’ [-Wunused-variable]
     7259 |  int min_error=255*255*8*3;
          |      ^~~~~~~~~
    etcpack/source/etcpack.cxx:7260:15: warning: unused variable ‘best_table_indices1’ [-Wunused-variable]
     7260 |  unsigned int best_table_indices1=0, best_table_indices2=0;
          |               ^~~~~~~~~~~~~~~~~~~
    etcpack/source/etcpack.cxx:7260:38: warning: unused variable ‘best_table_indices2’ [-Wunused-variable]
     7260 |  unsigned int best_table_indices1=0, best_table_indices2=0;
          |                                      ^~~~~~~~~~~~~~~~~~~
    etcpack/source/etcpack.cxx: In function ‘int compressBlockDifferentialWithAlpha(bool, uint8*, uint8*, uint8*, int, int, int, int, unsigned int&, unsigned int&)’:
    etcpack/source/etcpack.cxx:7673:6: warning: unused variable ‘min_error’ [-Wunused-variable]
     7673 |  int min_error=255*255*8*3;
          |      ^~~~~~~~~
    etcpack/source/etcpack.cxx: In function ‘void stuff59bitsDiffFalse(unsigned int, unsigned int, unsigned int&, unsigned int&)’:
    etcpack/source/etcpack.cxx:8096:19: warning: suggest parentheses around operand of ‘!’ or change ‘&’ to ‘&&’ or ‘!’ to ‘~’ [-Wparentheses]
     8096 |  bit = (a & c) | (!a & b & c & d) | (a & b & !c & d);
          |                   ^~
    etcpack/source/etcpack.cxx: In function ‘void readAlpha(uint8*&, int&, int&, int&, int&)’:
    etcpack/source/etcpack.cxx:8516:11: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
     8516 |  fReadPGM("alpha.pgm",width,height,tempdata,wantedBitDepth);
          |           ^~~~~~~~~~~
    etcpack/source/etcpack.cxx: In function ‘void compressBlockAlphaSlow(uint8*, int, int, int, int, uint8*)’:
    etcpack/source/etcpack.cxx:8893:6: warning: unused variable ‘maxdist’ [-Wunused-variable]
     8893 |  int maxdist=-2;
          |      ^~~~~~~
    etcpack/source/etcpack.cxx: In function ‘void uncompressFile(char*, uint8*&, uint8*&, int&, int&)’:
    etcpack/source/etcpack.cxx:9114:6: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
     9114 |  if(f=fopen(srcfile,"rb"))
          |     ~^~~~~~~~~~~~~~~~~~~~
    etcpack/source/etcpack.cxx:9211:13: warning: too many arguments for format [-Wformat-extra-args]
     9211 |      printf("Known formats: ETC1_RGB_NO_MIPMAPS.\n", srcfile);
          |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    etcpack/source/etcpack.cxx:9255:13: warning: too many arguments for format [-Wformat-extra-args]
     9255 |      printf("Known formats: ETC2PACKAGE_RGB_NO_MIPMAPS.\n", srcfile);
          |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    etcpack/source/etcpack.cxx: In function ‘void writeOutputFile(char*, uint8*, uint8*, int, int)’:
    etcpack/source/etcpack.cxx:9460:13: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
     9460 |   fWritePPM("tmp.ppm",width,height,img,8,false);
          |             ^~~~~~~~~
    etcpack/source/etcpack.cxx:9465:13: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
     9465 |   fWritePPM("tmp.ppm",width,height,img,16,false);
          |             ^~~~~~~~~
    etcpack/source/etcpack.cxx:9468:13: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
     9468 |   fWritePGM("alphaout.pgm",width,height,alphaimg,false,8);
          |             ^~~~~~~~~~~~~~
    etcpack/source/etcpack.cxx:9470:13: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
     9470 |   fWritePGM("alphaout.pgm",width,height,alphaimg,false,16);
          |             ^~~~~~~~~~~~~~
    etcpack/source/etcpack.cxx:9506:13: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
     9506 |    fReadPPM("tmp.ppm", rw, rh, pixelsRGB, 8);
          |             ^~~~~~~~~
    etcpack/source/etcpack.cxx:9507:22: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
     9507 |             fReadPGM("alphaout.pgm", rw, rh, pixelsA, 8);
          |                      ^~~~~~~~~~~~~~
    etcpack/source/etcpack.cxx:9511:25: warning: zero-length gnu_printf format string [-Wformat-zero-length]
     9511 |             sprintf(str,""); // Nothing to execute.
          |                         ^~
    etcpack/source/etcpack.cxx: In function ‘double calculatePSNRfile(char*, uint8*, uint8*)’:
    etcpack/source/etcpack.cxx:9541:23: warning: unused variable ‘MSEB’ [-Wunused-variable]
     9541 |  double MSER=0,MSEG=0,MSEB=0,MSEA, PSNRR,PSNRG,PSNRA;
          |                       ^~~~
    etcpack/source/etcpack.cxx:9551:6: warning: unused variable ‘height’ [-Wunused-variable]
     9551 |  int height=((active_height+3)/4)*4;
          |      ^~~~~~
    etcpack/source/etcpack.cxx: In function ‘unsigned int compressBlockIndividualExhaustivePerceptual(uint8*, int, int, int, int, unsigned int&, unsigned int&, unsigned int)’:
    etcpack/source/etcpack.cxx:10480:15: warning: unused variable ‘best_err_norm_diff’ [-Wunused-variable]
    10480 |  unsigned int best_err_norm_diff = MAXERR1000;
          |               ^~~~~~~~~~~~~~~~~~
    etcpack/source/etcpack.cxx:10481:15: warning: unused variable ‘best_err_norm_444’ [-Wunused-variable]
    10481 |  unsigned int best_err_norm_444 = MAXERR1000;
          |               ^~~~~~~~~~~~~~~~~
    etcpack/source/etcpack.cxx:10482:15: warning: unused variable ‘best_err_flip_diff’ [-Wunused-variable]
    10482 |  unsigned int best_err_flip_diff = MAXERR1000;
          |               ^~~~~~~~~~~~~~~~~~
    etcpack/source/etcpack.cxx:10483:15: warning: unused variable ‘best_err_flip_444’ [-Wunused-variable]
    10483 |  unsigned int best_err_flip_444 = MAXERR1000;
          |               ^~~~~~~~~~~~~~~~~
    etcpack/source/etcpack.cxx:10489:6: warning: unused variable ‘min_error’ [-Wunused-variable]
    10489 |  int min_error=MAXERR1000;
          |      ^~~~~~~~~
    etcpack/source/etcpack.cxx:10494:15: warning: unused variable ‘pixel_indices1_MSB’ [-Wunused-variable]
    10494 |  unsigned int pixel_indices1_MSB=0;
          |               ^~~~~~~~~~~~~~~~~~
    etcpack/source/etcpack.cxx:10495:15: warning: unused variable ‘pixel_indices1_LSB’ [-Wunused-variable]
    10495 |  unsigned int pixel_indices1_LSB=0;
          |               ^~~~~~~~~~~~~~~~~~
    etcpack/source/etcpack.cxx:10496:15: warning: unused variable ‘pixel_indices2_MSB’ [-Wunused-variable]
    10496 |  unsigned int pixel_indices2_MSB=0;
          |               ^~~~~~~~~~~~~~~~~~
    etcpack/source/etcpack.cxx:10501:15: warning: unused variable ‘pixel_indices2_LSB’ [-Wunused-variable]
    10501 |  unsigned int pixel_indices2_LSB=0;
          |               ^~~~~~~~~~~~~~~~~~
    etcpack/source/etcpack.cxx:10514:15: warning: unused variable ‘table1’ [-Wunused-variable]
    10514 |  unsigned int table1=0, table2=0;
          |               ^~~~~~
    etcpack/source/etcpack.cxx:10514:25: warning: unused variable ‘table2’ [-Wunused-variable]
    10514 |  unsigned int table1=0, table2=0;
          |                         ^~~~~~
    etcpack/source/etcpack.cxx:10585:15: warning: unused variable ‘tryblocks’ [-Wunused-variable]
    10585 |  unsigned int tryblocks = 0;
          |               ^~~~~~~~~
    etcpack/source/etcpack.cxx:10586:15: warning: unused variable ‘allblocks’ [-Wunused-variable]
    10586 |  unsigned int allblocks = 0;
          |               ^~~~~~~~~
    etcpack/source/etcpack.cxx: In function ‘unsigned int compressBlockIndividualExhaustive(uint8*, int, int, int, int, unsigned int&, unsigned int&, unsigned int)’:
    etcpack/source/etcpack.cxx:10765:15: warning: unused variable ‘best_err_norm_diff’ [-Wunused-variable]
    10765 |  unsigned int best_err_norm_diff = 255*255*16*3;
          |               ^~~~~~~~~~~~~~~~~~
    etcpack/source/etcpack.cxx:10766:15: warning: unused variable ‘best_err_norm_444’ [-Wunused-variable]
    10766 |  unsigned int best_err_norm_444 = 255*255*16*3;
          |               ^~~~~~~~~~~~~~~~~
    etcpack/source/etcpack.cxx:10767:15: warning: unused variable ‘best_err_flip_diff’ [-Wunused-variable]
    10767 |  unsigned int best_err_flip_diff = 255*255*16*3;
          |               ^~~~~~~~~~~~~~~~~~
    etcpack/source/etcpack.cxx:10768:15: warning: unused variable ‘best_err_flip_444’ [-Wunused-variable]
    10768 |  unsigned int best_err_flip_444 = 255*255*16*3;
          |               ^~~~~~~~~~~~~~~~~
    etcpack/source/etcpack.cxx:10774:6: warning: unused variable ‘min_error’ [-Wunused-variable]
    10774 |  int min_error=255*255*8*3;
          |      ^~~~~~~~~
    etcpack/source/etcpack.cxx:10779:15: warning: unused variable ‘pixel_indices1_MSB’ [-Wunused-variable]
    10779 |  unsigned int pixel_indices1_MSB=0;
          |               ^~~~~~~~~~~~~~~~~~
    etcpack/source/etcpack.cxx:10780:15: warning: unused variable ‘pixel_indices1_LSB’ [-Wunused-variable]
    10780 |  unsigned int pixel_indices1_LSB=0;
          |               ^~~~~~~~~~~~~~~~~~
    etcpack/source/etcpack.cxx:10781:15: warning: unused variable ‘pixel_indices2_MSB’ [-Wunused-variable]
    10781 |  unsigned int pixel_indices2_MSB=0;
          |               ^~~~~~~~~~~~~~~~~~
    etcpack/source/etcpack.cxx:10786:15: warning: unused variable ‘pixel_indices2_LSB’ [-Wunused-variable]
    10786 |  unsigned int pixel_indices2_LSB=0;
          |               ^~~~~~~~~~~~~~~~~~
    etcpack/source/etcpack.cxx:10799:15: warning: unused variable ‘table1’ [-Wunused-variable]
    10799 |  unsigned int table1=0, table2=0;
          |               ^~~~~~
    etcpack/source/etcpack.cxx:10799:25: warning: unused variable ‘table2’ [-Wunused-variable]
    10799 |  unsigned int table1=0, table2=0;
          |                         ^~~~~~
    etcpack/source/etcpack.cxx:10872:15: warning: unused variable ‘tryblocks’ [-Wunused-variable]
    10872 |  unsigned int tryblocks = 0;
          |               ^~~~~~~~~
    etcpack/source/etcpack.cxx:10873:15: warning: unused variable ‘allblocks’ [-Wunused-variable]
    10873 |  unsigned int allblocks = 0;
          |               ^~~~~~~~~
    etcpack/source/etcpack.cxx: In function ‘unsigned int compressBlockDifferentialExhaustivePerceptual(uint8*, int, int, int, int, unsigned int&, unsigned int&, unsigned int)’:
    etcpack/source/etcpack.cxx:11048:15: warning: unused variable ‘best_err_norm_diff’ [-Wunused-variable]
    11048 |  unsigned int best_err_norm_diff = MAXERR1000;
          |               ^~~~~~~~~~~~~~~~~~
    etcpack/source/etcpack.cxx:11049:15: warning: unused variable ‘best_err_norm_444’ [-Wunused-variable]
    11049 |  unsigned int best_err_norm_444 = MAXERR1000;
          |               ^~~~~~~~~~~~~~~~~
    etcpack/source/etcpack.cxx:11050:15: warning: unused variable ‘best_err_flip_diff’ [-Wunused-variable]
    11050 |  unsigned int best_err_flip_diff = MAXERR1000;
          |               ^~~~~~~~~~~~~~~~~~
    etcpack/source/etcpack.cxx:11051:15: warning: unused variable ‘best_err_flip_444’ [-Wunused-variable]
    11051 |  unsigned int best_err_flip_444 = MAXERR1000;
          |               ^~~~~~~~~~~~~~~~~
    etcpack/source/etcpack.cxx:11062:15: warning: unused variable ‘pixel_indices1_MSB’ [-Wunused-variable]
    11062 |  unsigned int pixel_indices1_MSB=0;
          |               ^~~~~~~~~~~~~~~~~~
    etcpack/source/etcpack.cxx:11063:15: warning: unused variable ‘pixel_indices1_LSB’ [-Wunused-variable]
    11063 |  unsigned int pixel_indices1_LSB=0;
          |               ^~~~~~~~~~~~~~~~~~
    etcpack/source/etcpack.cxx:11064:15: warning: unused variable ‘pixel_indices2_MSB’ [-Wunused-variable]
    11064 |  unsigned int pixel_indices2_MSB=0;
          |               ^~~~~~~~~~~~~~~~~~
    etcpack/source/etcpack.cxx:11069:15: warning: unused variable ‘pixel_indices2_LSB’ [-Wunused-variable]
    11069 |  unsigned int pixel_indices2_LSB=0;
          |               ^~~~~~~~~~~~~~~~~~
    etcpack/source/etcpack.cxx:11071:15: warning: unused variable ‘table1’ [-Wunused-variable]
    11071 |  unsigned int table1=0, table2=0;
          |               ^~~~~~
    etcpack/source/etcpack.cxx:11071:25: warning: unused variable ‘table2’ [-Wunused-variable]
    11071 |  unsigned int table1=0, table2=0;
          |                         ^~~~~~
    etcpack/source/etcpack.cxx: In function ‘unsigned int compressBlockDifferentialExhaustive(uint8*, int, int, int, int, unsigned int&, unsigned int&, unsigned int)’:
    etcpack/source/etcpack.cxx:11446:15: warning: unused variable ‘best_err_norm_diff’ [-Wunused-variable]
    11446 |  unsigned int best_err_norm_diff = 255*255*16*3;
          |               ^~~~~~~~~~~~~~~~~~
    etcpack/source/etcpack.cxx:11447:15: warning: unused variable ‘best_err_norm_444’ [-Wunused-variable]
    11447 |  unsigned int best_err_norm_444 = 255*255*16*3;
          |               ^~~~~~~~~~~~~~~~~
    etcpack/source/etcpack.cxx:11448:15: warning: unused variable ‘best_err_flip_diff’ [-Wunused-variable]
    11448 |  unsigned int best_err_flip_diff = 255*255*16*3;
          |               ^~~~~~~~~~~~~~~~~~
    etcpack/source/etcpack.cxx:11449:15: warning: unused variable ‘best_err_flip_444’ [-Wunused-variable]
    11449 |  unsigned int best_err_flip_444 = 255*255*16*3;
          |               ^~~~~~~~~~~~~~~~~
    etcpack/source/etcpack.cxx:11455:6: warning: unused variable ‘min_error’ [-Wunused-variable]
    11455 |  int min_error=255*255*8*3;
          |      ^~~~~~~~~
    etcpack/source/etcpack.cxx:11460:15: warning: unused variable ‘pixel_indices1_MSB’ [-Wunused-variable]
    11460 |  unsigned int pixel_indices1_MSB=0;
          |               ^~~~~~~~~~~~~~~~~~
    etcpack/source/etcpack.cxx:11461:15: warning: unused variable ‘pixel_indices1_LSB’ [-Wunused-variable]
    11461 |  unsigned int pixel_indices1_LSB=0;
          |               ^~~~~~~~~~~~~~~~~~
    etcpack/source/etcpack.cxx:11462:15: warning: unused variable ‘pixel_indices2_MSB’ [-Wunused-variable]
    11462 |  unsigned int pixel_indices2_MSB=0;
          |               ^~~~~~~~~~~~~~~~~~
    etcpack/source/etcpack.cxx:11467:15: warning: unused variable ‘pixel_indices2_LSB’ [-Wunused-variable]
    11467 |  unsigned int pixel_indices2_LSB=0;
          |               ^~~~~~~~~~~~~~~~~~
    etcpack/source/etcpack.cxx:11469:15: warning: unused variable ‘table1’ [-Wunused-variable]
    11469 |  unsigned int table1=0, table2=0;
          |               ^~~~~~
    etcpack/source/etcpack.cxx:11469:25: warning: unused variable ‘table2’ [-Wunused-variable]
    11469 |  unsigned int table1=0, table2=0;
          |                         ^~~~~~
    etcpack/source/etcpack.cxx: In function ‘void precalcError59T_col0_Rpercep1000(uint8*, int, unsigned int*)’:
    etcpack/source/etcpack.cxx:12313:15: warning: unused variable ‘block_error’ [-Wunused-variable]
    12313 |  unsigned int block_error = 0,
          |               ^~~~~~~~~~~
    etcpack/source/etcpack.cxx:12314:12: warning: unused variable ‘best_block_error’ [-Wunused-variable]
    12314 |            best_block_error = MAXERR1000,
          |            ^~~~~~~~~~~~~~~~
    etcpack/source/etcpack.cxx: In function ‘void precalcError59T_col0_R(uint8*, int, unsigned int*)’:
    etcpack/source/etcpack.cxx:12362:15: warning: unused variable ‘block_error’ [-Wunused-variable]
    12362 |  unsigned int block_error = 0,
          |               ^~~~~~~~~~~
    etcpack/source/etcpack.cxx:12363:14: warning: unused variable ‘best_block_error’ [-Wunused-variable]
    12363 |              best_block_error = MAXIMUM_ERROR,
          |              ^~~~~~~~~~~~~~~~
    etcpack/source/etcpack.cxx: In function ‘void precalcError59T_col0_RGpercep1000(uint8*, int, unsigned int*)’:
    etcpack/source/etcpack.cxx:12408:15: warning: unused variable ‘block_error’ [-Wunused-variable]
    12408 |  unsigned int block_error = 0,
          |               ^~~~~~~~~~~
    etcpack/source/etcpack.cxx:12409:12: warning: unused variable ‘best_block_error’ [-Wunused-variable]
    12409 |            best_block_error = MAXERR1000,
          |            ^~~~~~~~~~~~~~~~
    etcpack/source/etcpack.cxx: In function ‘void precalcError59T_col0_RG(uint8*, int, unsigned int*)’:
    etcpack/source/etcpack.cxx:12463:15: warning: unused variable ‘block_error’ [-Wunused-variable]
    12463 |  unsigned int block_error = 0,
          |               ^~~~~~~~~~~
    etcpack/source/etcpack.cxx:12464:12: warning: unused variable ‘best_block_error’ [-Wunused-variable]
    12464 |            best_block_error = MAXIMUM_ERROR,
          |            ^~~~~~~~~~~~~~~~
    etcpack/source/etcpack.cxx: In function ‘void precalcError59T_col0_RGBpercep1000(uint8*, int, unsigned int*)’:
    etcpack/source/etcpack.cxx:12607:15: warning: unused variable ‘block_error’ [-Wunused-variable]
    12607 |  unsigned int block_error = 0,
          |               ^~~~~~~~~~~
    etcpack/source/etcpack.cxx:12608:12: warning: unused variable ‘best_block_error’ [-Wunused-variable]
    12608 |            best_block_error = MAXERR1000,
          |            ^~~~~~~~~~~~~~~~
    etcpack/source/etcpack.cxx: In function ‘void precalcError59T_col0_RGB(uint8*, int, unsigned int*)’:
    etcpack/source/etcpack.cxx:12691:15: warning: unused variable ‘block_error’ [-Wunused-variable]
    12691 |  unsigned int block_error = 0,
          |               ^~~~~~~~~~~
    etcpack/source/etcpack.cxx:12692:12: warning: unused variable ‘best_block_error’ [-Wunused-variable]
    12692 |            best_block_error = MAXIMUM_ERROR,
          |            ^~~~~~~~~~~~~~~~
    etcpack/source/etcpack.cxx: In function ‘unsigned int compressBlockTHUMB59TExhaustivePerceptual(uint8*, int, int, int, int, unsigned int&, unsigned int&, unsigned int)’:
    etcpack/source/etcpack.cxx:13479:15: warning: unused variable ‘avoided’ [-Wunused-variable]
    13479 |  unsigned int avoided = 0;
          |               ^~~~~~~
    etcpack/source/etcpack.cxx: In function ‘unsigned int compressBlockTHUMB59TExhaustive(uint8*, int, int, int, int, unsigned int&, unsigned int&, unsigned int)’:
    etcpack/source/etcpack.cxx:13666:15: warning: unused variable ‘avoided’ [-Wunused-variable]
    13666 |  unsigned int avoided = 0;
          |               ^~~~~~~
    etcpack/source/etcpack.cxx: In function ‘void precalcErrorR_58Hperceptual1000(uint8*, int, int, int, uint8 (*)[3], int, unsigned int*)’:
    etcpack/source/etcpack.cxx:13745:6: warning: unused variable ‘best_block_error’ [-Wunused-variable]
    13745 |      best_block_error = MAXERR1000,
          |      ^~~~~~~~~~~~~~~~
    etcpack/source/etcpack.cxx: In function ‘void precalcErrorR_58H(uint8*, int, int, int, uint8 (*)[3], int, unsigned int*)’:
    etcpack/source/etcpack.cxx:13797:6: warning: unused variable ‘best_block_error’ [-Wunused-variable]
    13797 |      best_block_error = MAXIMUM_ERROR,
          |      ^~~~~~~~~~~~~~~~
    etcpack/source/etcpack.cxx: In function ‘void precalcErrorRG_58Hperceptual1000(uint8*, int, int, int, uint8 (*)[3], int, unsigned int*)’:
    etcpack/source/etcpack.cxx:13849:6: warning: unused variable ‘best_block_error’ [-Wunused-variable]
    13849 |      best_block_error = MAXERR1000,
          |      ^~~~~~~~~~~~~~~~
    etcpack/source/etcpack.cxx: In function ‘void precalcErrorRG_58H(uint8*, int, int, int, uint8 (*)[3], int, unsigned int*)’:
    etcpack/source/etcpack.cxx:13905:6: warning: unused variable ‘best_block_error’ [-Wunused-variable]
    13905 |      best_block_error = MAXIMUM_ERROR,
          |      ^~~~~~~~~~~~~~~~
    etcpack/source/etcpack.cxx: In function ‘unsigned int compressBlockTHUMB58HExhaustivePerceptual(uint8*, int, int, int, int, unsigned int&, unsigned int&, unsigned int)’:
    etcpack/source/etcpack.cxx:130:34: warning: result of ‘(2 << 31)’ requires 34 bits to represent, but ‘int’ only has 32 bits [-Wshift-overflow=]
      130 | #define MASK(size, startpos) (((2<<(size-1))-1) << SHIFT(size,startpos))
          |                                 ~^~~~~~~~~~
    etcpack/source/etcpack.cxx:131:63: note: in expansion of macro ‘MASK’
      131 | #define PUTBITS( dest, data, size, startpos) dest = ((dest & ~MASK(size, startpos)) | ((data << SHIFT(size, startpos)) & MASK(size,startpos)))
          |                                                               ^~~~
    etcpack/source/etcpack.cxx:14888:2: note: in expansion of macro ‘PUTBITS’
    14888 |  PUTBITS( compressed2, best_pixel_indices, 32, 31);
          |  ^~~~~~~
    etcpack/source/etcpack.cxx:130:34: warning: result of ‘(2 << 31)’ requires 34 bits to represent, but ‘int’ only has 32 bits [-Wshift-overflow=]
      130 | #define MASK(size, startpos) (((2<<(size-1))-1) << SHIFT(size,startpos))
          |                                 ~^~~~~~~~~~
    etcpack/source/etcpack.cxx:131:122: note: in expansion of macro ‘MASK’
      131 | #define PUTBITS( dest, data, size, startpos) dest = ((dest & ~MASK(size, startpos)) | ((data << SHIFT(size, startpos)) & MASK(size,startpos)))
          |                                                                                                                          ^~~~
    etcpack/source/etcpack.cxx:14888:2: note: in expansion of macro ‘PUTBITS’
    14888 |  PUTBITS( compressed2, best_pixel_indices, 32, 31);
          |  ^~~~~~~
    etcpack/source/etcpack.cxx:14791:6: warning: unused variable ‘trycols’ [-Wunused-variable]
    14791 |  int trycols = 0;
          |      ^~~~~~~
    etcpack/source/etcpack.cxx:14792:6: warning: unused variable ‘allcols’ [-Wunused-variable]
    14792 |  int allcols = 0;
          |      ^~~~~~~
    etcpack/source/etcpack.cxx: In function ‘unsigned int compressBlockTHUMB58HExhaustive(uint8*, int, int, int, int, unsigned int&, unsigned int&, unsigned int)’:
    etcpack/source/etcpack.cxx:130:34: warning: result of ‘(2 << 31)’ requires 34 bits to represent, but ‘int’ only has 32 bits [-Wshift-overflow=]
      130 | #define MASK(size, startpos) (((2<<(size-1))-1) << SHIFT(size,startpos))
          |                                 ~^~~~~~~~~~
    etcpack/source/etcpack.cxx:131:63: note: in expansion of macro ‘MASK’
      131 | #define PUTBITS( dest, data, size, startpos) dest = ((dest & ~MASK(size, startpos)) | ((data << SHIFT(size, startpos)) & MASK(size,startpos)))
          |                                                               ^~~~
    etcpack/source/etcpack.cxx:15099:2: note: in expansion of macro ‘PUTBITS’
    15099 |  PUTBITS( compressed2, best_pixel_indices, 32, 31);
          |  ^~~~~~~
    etcpack/source/etcpack.cxx:130:34: warning: result of ‘(2 << 31)’ requires 34 bits to represent, but ‘int’ only has 32 bits [-Wshift-overflow=]
      130 | #define MASK(size, startpos) (((2<<(size-1))-1) << SHIFT(size,startpos))
          |                                 ~^~~~~~~~~~
    etcpack/source/etcpack.cxx:131:122: note: in expansion of macro ‘MASK’
      131 | #define PUTBITS( dest, data, size, startpos) dest = ((dest & ~MASK(size, startpos)) | ((data << SHIFT(size, startpos)) & MASK(size,startpos)))
          |                                                                                                                          ^~~~
    etcpack/source/etcpack.cxx:15099:2: note: in expansion of macro ‘PUTBITS’
    15099 |  PUTBITS( compressed2, best_pixel_indices, 32, 31);
          |  ^~~~~~~
    etcpack/source/etcpack.cxx:15002:6: warning: unused variable ‘trycols’ [-Wunused-variable]
    15002 |  int trycols = 0;
          |      ^~~~~~~
    etcpack/source/etcpack.cxx:15003:6: warning: unused variable ‘allcols’ [-Wunused-variable]
    15003 |  int allcols = 0;
          |      ^~~~~~~
    etcpack/source/etcpack.cxx: In function ‘void compressImageFile(uint8*, uint8*, int, int, char*, int, int)’:
    etcpack/source/etcpack.cxx:15573:6: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
    15573 |  if(f=fopen(dstfile,"wb"))
          |     ~^~~~~~~~~~~~~~~~~~~~
    etcpack/source/etcpack.cxx: In function ‘void compressFile(char*, char*)’:
    etcpack/source/etcpack.cxx:15886:6: warning: unused variable ‘tstart’ [-Wunused-variable]
    15886 |  int tstart;
          |      ^~~~~~
    etcpack/source/etcpack.cxx:15887:6: warning: unused variable ‘tstop’ [-Wunused-variable]
    15887 |  int tstop;
          |      ^~~~~
    etcpack/source/etcpack.cxx: In function ‘int main(int, char**)’:
    etcpack/source/etcpack.cxx:16025:7: warning: unused variable ‘q’ [-Wunused-variable]
    16025 |   int q = find_pos_of_extension(srcfile);
          |       ^
    etcpack/source/etcpack.cxx:16026:7: warning: unused variable ‘q2’ [-Wunused-variable]
    16026 |   int q2 = find_pos_of_extension(dstfile);
          |       ^~
    etcpack/source/etcpack.cxx: At global scope:
    etcpack/source/etcpack.cxx:222:12: warning: ‘unscramble’ defined but not used [-Wunused-variable]
      222 | static int unscramble[4] = {2, 3, 1, 0};
          |            ^~~~~~~~~~
    error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
    
    ----------------------------------------
Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-9xi2kuyx/etcpack/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-71jbq1db/install-record.txt --single-version-externally-managed --compile --user --prefix=" failed with error code 1 in /tmp/pip-install-9xi2kuyx/etcpack/
chayleaf added a commit to chayleaf/etcpack that referenced this issue Aug 19, 2023
Both K0lb3#1 and K0lb3#2 were caused by Cython not being installed, this causes an error message in such a case so the user knows what went wrong.
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

No branches or pull requests

1 participant