Open xypron opened 2 months ago
Building results in warnings
src/esw_build_signature.cpp:913:14: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 913 | fread(buffer_bin, 1, NUMBER_OF_ONE_LINE, src_file); | ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/esw_build_signature.cpp:949:14: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 949 | fread(buffer_bin, 1, src_file_remainder, src_file); | ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/esw_build_signature.cpp: In function ‘int create_chief_sign_file()’: src/esw_build_signature.cpp:1159:18: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 1159 | fread(&tmp, 1, 1, fr); | ~~~~~^~~~~~~~~~~~~~~~
The return values of fseek, fread, fwrite should be checked. Failures should result in exiting the program.
We submitted code to solve the above problem: commit d1d48f48660a0dae9f6978ef99bbbcaf2944f3bb
Building results in warnings
The return values of fseek, fread, fwrite should be checked. Failures should result in exiting the program.