Opened 12 years ago
#1186 new Defect
ignored return values, gcc warning in 7.0.28
Reported by: | smoe | Owned by: | romw |
---|---|---|---|
Priority: | Minor | Milestone: | Undetermined |
Component: | Client - Build | Version: | 7.0.26 |
Keywords: | Cc: |
Description
Hello, please consider addressing those warnings.
Kind regards,
Steffen
app_control.cpp: In member function ‘void ACTIVE_TASK::read_task_state_file()’:
app_control.cpp:1374:27: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
app_control.cpp: In member function ‘bool ACTIVE_TASK::temporary_exit_file_present(double&, char*)’:
app_control.cpp:550:23: warning: ignoring return value of ‘char* fgets(char*, int, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
app_control.cpp:551:23: warning: ignoring return value of ‘char* fgets(char*, int, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
if g++ -DHAVE_CONFIG_H -I. -I. -I.. -I../api -I../db -I../lib -I../lib/mac -I../sched -I../tools -I../vda -pthread -Wall -Wextra -Wshadow -Wredundant-decls -Wdisabled-optimization -Wpointer-arith -Wstrict-aliasing -g -Wall -D_FORTIFY_SOURCE=1 -fstack-protector -O2 -Wall -MT boinc_client-app_start.o -MD -MP -MF ".deps/boinc_client-app_start.Tpo" -c -o boinc_client-app_start.o `test -f 'app_start.cpp' || echo './'`app_start.cpp; \
then mv -f ".deps/boinc_client-app_start.Tpo" ".deps/boinc_client-app_start.Po"; else rm -f ".deps/boinc_client-app_start.Tpo"; exit 1; fi
app_start.cpp: In member function ‘int ACTIVE_TASK::start()’:
app_start.cpp:841:45: warning: ignoring return value of ‘char* getcwd(char*, size_t)’, declared with attribute warn_unused_result [-Wunused-result]
app_start.cpp:985:43: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]