I have the webwho snippet installed and it works great. However, if I compile under gcc-3.4 it compiles error free, when I try to use GCC 4.1 it gives me the following error:
Compiling –> o/websrv.o… cc1: warnings being treated as errors websrv.c: In function add_linebreaks: websrv.c:912: warning: value computed is not used make[1]: *** [o/websrv.o] Error 1 make: *** [all] Error 2
Thank you for the quick response Tyche. This allowed the code to compile without the error. I realize the code is pretty messy. All it does it add the <br> to the end of each line in a help file to allow it to look right on the website. Functions like this are not something I am good with. I also didn't write it. But again, I thank you very much.
There's actually no error, just a warning. But you're compiling in a way that forces warnings to be errors, and does not end up compiling.
I have -Werror enabled in my Makefile. I like knowing that my code doesn't have any unused variables or simple problems like that. The add_linebreaks was the last warning standing in my way between a clean compile under GCC-4.1. Tyche's fix cleared the problem up and everything still works properly.
The add_linebreaks code is as follows:
I don't really know what I can do to avoid the error. Any help would be appreciated. I am sure its a simple fix.