xray-16 icon indicating copy to clipboard operation
xray-16 copied to clipboard

Fix almost all -Wall warnings

Open Masterkatze opened this issue 4 years ago • 3 comments

Masterkatze avatar Nov 11 '21 00:11 Masterkatze

Errors on my end, x86_64 Linux w/ GCC10 (and 9):

[ 10%] Building CXX object src/xrCore/CMakeFiles/xrCore.dir/FS.cpp.o
/build/source/src/xrCore/FS.cpp: In function 'void FileCompress(pcstr, pcstr, void*, size_t)':
/build/source/src/xrCore/FS.cpp:172:11: error: ignoring return value of 'ssize_t write(int, const void*, size_t)' declared with attribute 'warn_unused_result' [8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wunused-result-Werror=unused-result8;;]
  172 |     _write(H, &M, 8);
      |           ^
/build/source/src/xrCore/FS.cpp: In function 'void* FileDecompress(pcstr, pcstr, size_t*)':
/build/source/src/xrCore/FS.cpp:184:10: error: ignoring return value of 'ssize_t read(int, void*, size_t)' declared with attribute 'warn_unused_result' [8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wunused-result-Werror=unused-result8;;]
  184 |     _read(H, &F, 8);
      |          ^
cc1plus: all warnings being treated as errors
make[2]: *** [src/xrCore/CMakeFiles/xrCore.dir/build.make:237: src/xrCore/CMakeFiles/xrCore.dir/FS.cpp.o] Error 1

OPNA2608 avatar Jan 07 '22 21:01 OPNA2608

@OPNA2608 Hi, sorry for such late answer, can you try it now?

Masterkatze avatar May 04 '22 22:05 Masterkatze

Doesn't error anymore, but some warnings remain on my end. Here's the build log.

OPNA2608 avatar May 07 '22 09:05 OPNA2608

Случайно закрыл

Masterkatze avatar Mar 26 '23 14:03 Masterkatze

Since you have submitted a major number of changes from this PR in separate PRs, let's close it to reduce the number of pull requests. :)

Xottab-DUTY avatar Apr 29 '23 23:04 Xottab-DUTY