halayli / lthread

lthread, a multicore enabled coroutine library written in C
Other
814 stars 82 forks source link

Fixed compilation using the -Werror flag #8

Closed kksym closed 12 years ago

kksym commented 12 years ago

lthread_compute.c and lthread_sched.c had unused 'ret' variables in certain functions that cause compilation to fail with the GCC -Werror flag. My commit rectifies this.

halayli commented 12 years ago

Interesting. I added them on purpose to silence gcc on Fedora. What OS did you try it on?

kksym commented 12 years ago

The OS was Arch Linux x86, with GCC 4.6.2, hope this helps.

swapi commented 12 years ago

I am trying to compile it on Ubuntu with gcc version 4.6.1. With ret it gives same error as 'kk' mentioned above. And removing ret gives another error (the return value of read is unused). I suppressed the first error using gcc " attribute ((unused))". Now it compiles correctly.

Refer swapi/lthread@17e8e31cf39e07d0e686b645e037d39142ee18b3