Hi,
while building a rpm package of nco, I encountered two things:
1) rpmlint complains about 4 instances of no-return-in-nonvoid-function, i.e.
the tool can't prove that a nonvoid function has always a return statement.
Unfortunately this breaks the build, as the use of rpmlint seems mandatory
in the rpm build process. I did a quick bandaid to overcome this and finish
the build. At least in one case the warning could denote a real issue.
Attached you can find my bandaid against 4.5.5, but should also apply to recent code.
Not sure if the second hunk is really correct...
2) the GNU extension strcasestr needs the preprocessor macro _GNU_SOURCE to
get the proper function prototype. I added it to the affected files, see second attachment.
Thank you for these patches, Manfred. I applied them to the current source. However, the current snapshot does not build for other reasons, so the patches are not 100% tested yet. Will close this once everything checks out.
Thanks.
I have added builds of NCO to the Science project of the openSUSE Build Service,
binaries may be accessed at http://software.opensuse.org/package/nco/
It turns out that GNU_SOURCE breaks more than it fixes so I had to remove it again, temporarily, I hope.
Hi Charlie,
I tried to build 4.6.5, and the rpmlint issue popped up again, this time with
E: nco no-return-in-nonvoid-function fmc_all_cls.cc:3780
I will attach my bandaid which allowed me to build, but I'm not convinced it is correct,
please have a look.
Thank you for the patch, which I have just applied! And thanks for building NCO for openSUSE!
You're welcome. No idea why gcc does not catch such issues, shouldn't be so difficult, me thinks...