Opened 11 years ago

Closed 11 years ago

#39 closed defect (invalid)

Error during compilig on 64bit linux machine

Reported by: satisfree Owned by:
Priority: major Component:
Severity: medium Keywords:
Cc: Sensitive: no


Please can u fix this problem during compiling oscam on 64bit linux pc.

cc1: warnings being treated as errors
/oscam/reader-common.c: In function ‘reader_emm’:
/oscam/reader-common.c:403: error: ignoring return value of ‘fwrite’, declared with attribute warn_unused_result
make[2]: * [CMakeFiles/csreaders.dir/reader-common.o] Error 1
* [CMakeFiles/csreaders.dir/all] Error 2
make: * [all] Error 2

I think it is a bug of gcc.
Tnk u

Change History (2)

comment:1 by rorothetroll, 11 years ago

What version of gcc are you using.
For me it compiles on 32 and 64 bit linux box with gcc 4.3.4 and on Mac OS X with gcc 4.0.1 and 4.2.1

If you still see the problem you can add a int nb_write; at the beginning of the function and add nb_write= in front of the fwrite :
int nb_write;
nb_write=fwrite (ep, sizeof (*ep), 1, fp);

this should fix it but this is not a normal gcc behavior so you might want to update your gcc

comment:2 by landlord, 11 years ago

Resolution: invalid
Status: newclosed

Checks it. Works fine. Seems to be a problem of your compiler.

Note: See TracTickets for help on using tickets.