Closed voichek closed 5 years ago
Hi,
I have tried a couple of gcc versions and none of them shows this warning. Anyway I think it should be fixed with 89fcd81. Let me know if it is and what compiler do you use. Thanks
Hi,
Thanks for the help!
The update fixed the first warning but not the second one. I still get:
nclude/KMC/kmc_api/kmc_file.cpp: In member function ‘bool CKMCFile::RestartListing()’: include/KMC/kmc_api/kmc_file.cpp:669:9: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Wunused-result] fread (sufix_file_buf, 1, (size_t) part_size, file_suf); ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This is my command in g++
g++ -std=c++14 -Wall -O3 -I ./include/ -pthread -msse4.2 -march=native -MMD -c include/KMC/kmc_api/kmc_file.cpp -o build/kmc_file.o
Version:
$ g++ --version g++ (Ubuntu 7.3.0-27ubuntu1~18.04) 7.3.0
Sorry to nag you on a warning massage, I am a bit pedantic.
Best wishes, Yoav
Hi, thanks, I didn't use g++ 7.3.0, although I have tried 8.2.0. My compiler does not show this warning, I don't know why, because I think it should. Nevertheless, 2183fc4 should fix that (in fact the previous commit could break kmc api without the piece of code I just added). If it is OK now, please close this issue. Thanks!
No warnings anymore, thanks!
Hi,
I was wondering if you could fix this warning I am getting when I compile kmc_api? ` include/KMC/kmc_api/kmc_file.cpp: In member function 'void CKMCFile::Reload_sufix_file_buf()': include/KMC/kmc_api/kmc_file.cpp:609:8: warning: ignoring return value of 'size_t fread(void, size_t, size_t, FILE)', declared with attribute warn_unused_result [-Wunused-result] fread (sufix_file_buf, 1, (size_t) part_size, file_suf);