DeadSix27 / waifu2x-converter-cpp

Improved fork of Waifu2X C++ using OpenCL and OpenCV
MIT License
792 stars 86 forks source link

Compile fails with GCC 10 #240

Closed kattjevfel closed 4 years ago

kattjevfel commented 4 years ago

Updated GCC 9.3.0 --> 10.1.0 today and waifu2x-converter-cpp fails to compile.

/home/katt/build/waifu2x-converter-cpp-git/src/waifu2x-converter-cpp/src/threadPool.cpp: In function ‘void w2xc::notify_event(int)’:
/home/katt/build/waifu2x-converter-cpp-git/src/waifu2x-converter-cpp/src/threadPool.cpp:99:4: error: ‘perror’ was not declared in this scope
   99 |    perror("write");    /* ?? */
      |    ^~~~~~
/home/katt/build/waifu2x-converter-cpp-git/src/waifu2x-converter-cpp/src/threadPool.cpp: In function ‘void w2xc::wait_event(int)’:
/home/katt/build/waifu2x-converter-cpp-git/src/waifu2x-converter-cpp/src/threadPool.cpp:111:4: error: ‘perror’ was not declared in this scope
  111 |    perror("read");    /* ?? */
      |    ^~~~~~
make[2]: *** [CMakeFiles/w2xc.dir/build.make:161: CMakeFiles/w2xc.dir/src/threadPool.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
/home/katt/build/waifu2x-converter-cpp-git/src/waifu2x-converter-cpp/src/modelHandler.cpp: In constructor ‘w2xc::Model::Model(FILE*)’:
/home/katt/build/waifu2x-converter-cpp-git/src/waifu2x-converter-cpp/src/modelHandler.cpp:1075:8: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
 1075 |   fread(&nInputPlanes, 4, 1, binfp);
      |   ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/katt/build/waifu2x-converter-cpp-git/src/waifu2x-converter-cpp/src/modelHandler.cpp:1076:8: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
 1076 |   fread(&nOutputPlanes, 4, 1, binfp);
      |   ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/katt/build/waifu2x-converter-cpp-git/src/waifu2x-converter-cpp/src/modelHandler.cpp:1096:12: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
 1096 |       fread(&v, 8, 1, binfp);
      |       ~~~~~^~~~~~~~~~~~~~~~~
/home/katt/build/waifu2x-converter-cpp-git/src/waifu2x-converter-cpp/src/modelHandler.cpp:1108:9: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
 1108 |    fread(&v, 8, 1, binfp);
      |    ~~~~~^~~~~~~~~~~~~~~~~
/home/katt/build/waifu2x-converter-cpp-git/src/waifu2x-converter-cpp/src/modelHandler.cpp: In static member function ‘static bool w2xc::modelUtility::generateModelFromJSON(const _tstring&, std::vector<std::unique_ptr<w2xc::Model> >&)’:
/home/katt/build/waifu2x-converter-cpp-git/src/waifu2x-converter-cpp/src/modelHandler.cpp:1173:9: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
 1173 |    fread(&nModel, 4, 1, binfp);
      |    ~~~~~^~~~~~~~~~~~~~~~~~~~~~
make[1]: *** [CMakeFiles/Makefile2:156: CMakeFiles/w2xc.dir/all] Error 2
make: *** [Makefile:161: all] Error 2