I tried to run the makefile on https://github.com/nasadi/Zambezi. It shows an error like:-- "file included from src/driver/buildContiguous.c:7:0: src/shared/dictionary/Dictionary.h: In function ‘readDictionary’: src/shared/dictionary/Dictionary.h:132:8: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result] fread(&id, sizeof(int), 1, fp);" . Can anyone help me to run the program.Do i need to install any packages.I am new to c programming.
Asked
Active
Viewed 102 times
1 Answers
0
In fact, this is not an error, it is a warning. When compiler emits a warning, it means that code is syntactically correct but may potentially contain logic error.
In your case compiler says that return value of the fread
function is not examined. Such ignorance can lead to a situation, where, for e.g., end of file is encountered, but the program is unaware of it and continues execution. Therefore, variable read from file have wrong value, and wrong (invalid) values may cause program crash later on.
Summarizing, if there are no other errors, then your program is successfully compiled and can be run.

Dmitry Arestov
- 1,427
- 12
- 24
-
The program shows an error as: /usr/bin/ld: cannot open output file out/driver/buildContiguous: No such file or directory collect2: error: ld returned 1 exit status – Manaf Mh Mar 05 '15 at 07:27
-
@Manaf Mh You should read about this : http://stackoverflow.com/questions/6264249/how-does-the-compilation-linking-process-work – dkg Mar 05 '15 at 08:16
-
I manually created the directories and changed the makefile with another makefile available at github as:https://gist.github.com/ludkiller/f4b86da7604497f99d40 . But it still shows error as:"make: *** No rule to make target `all'. Stop." – Manaf Mh Mar 29 '15 at 14:28