http://bugzilla.novell.com/show_bug.cgi?id=502531
Summary: bsd-games-2.17-81.44: undefined code Classification: openSUSE Product: openSUSE 11.2 Version: Factory Platform: All OS/Version: openSUSE 11.1 Status: NEW Severity: Normal Priority: P5 - None Component: Other AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: dcb314@hotmail.com QAContact: qa@suse.de Found By: ---
I just tried to build Factory package bsd-games-2.17-81.44 and the build said
monop/cards.c:138: warning: operation on "dp->last_card" may be undefined
The source code is
dp->last_card = ++(dp->last_card) % dp->num_cards;
I agree with the compiler. Better code would be
dp->last_card = (dp->last_card + 1) % dp->num_cards;
http://bugzilla.novell.com/show_bug.cgi?id=502531
Marcus Meissner meissner@novell.com changed:
What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|bnc-team-screening@forge.pr |nadvornik@novell.com |ovo.novell.com |
http://bugzilla.novell.com/show_bug.cgi?id=502531
User rguenther@novell.com added comment http://bugzilla.novell.com/show_bug.cgi?id=502531#c1
--- Comment #1 from Richard Guenther rguenther@novell.com 2009-10-17 08:54:12 MDT --- David, in case the issues are not introduced by a patch local to openSUSE please report the issues upstream.
Packagers, please do not add openSUSE-local patches to fix this kind of errors but forward the bugs upstream and close the bugs as RESOLVED UPSTREAM.
Note that it is perfectly fine to have "resource leaks" at the end of a program as the kernel will clean up for you. Manually freeing them only increases binary size and runtime.
http://bugzilla.novell.com/show_bug.cgi?id=502531 http://bugzilla.novell.com/show_bug.cgi?id=502531#c2
Vladimir Nadvornik nadvornik@suse.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |WONTFIX
--- Comment #2 from Vladimir Nadvornik nadvornik@suse.com --- wontfix