Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 19842 - fortune-mod's rot enters infinite loop
Summary: fortune-mod's rot enters infinite loop
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Games (show other bugs)
Hardware: PPC Linux
: High trivial (vote)
Assignee: Gentoo Games
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-04-23 12:09 UTC by Tom Ward
Modified: 2003-06-27 22:51 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tom Ward 2003-04-23 12:09:42 UTC
If offensive quotes are enabled, the emerge of fortune-mod-9708 goes into an infinite 
loop attempting to rotate the offensive quotes. The problem is with the test in rot.c, 
which compares a char against EOF, and always returns true on this platform. 
 
powerpc-unknown-linux-gnu-gcc    -c -o rot.o rot.c 
rot.c: In function `main': 
rot.c:13: warning: comparison is always true due to limited range of data type 
powerpc-unknown-linux-gnu-gcc  -o rot rot.o 
 
Trivial fix: 
 
fortune-mod-9708/utils/rot.c:  
11c11 
<     char a, b; 
--- 
>     int a, b; 
 
System details: 
 
Portage 2.0.47-r10 (default-ppc-1.4, gcc-3.2.1, glibc-2.3.1-r4) 
================================================================= 
System uname: 2.4.20-ben10 ppc 
GENTOO_MIRRORS="http://www.mirror.ac.uk/sites/www.ibiblio.org/gentoo 
http://gentoo.oregonstate.edu/ http://www.ibiblio.org/pub/Linux/distributions/gentoo" 
CONFIG_PROTECT="/etc /var/qmail/control /usr/kde/2/share/config 
/usr/X11R6/lib/X11/xkb /usr/kde/3.1/share/config /usr/kde/3/share/config 
/usr/share/config" 
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d" 
PORTDIR="/usr/portage" 
DISTDIR="/usr/portage/distfiles" 
PKGDIR="/usr/portage/packages" 
PORTAGE_TMPDIR="/var/tmp" 
PORTDIR_OVERLAY="" 
USE="oss dvd xv libwww jpeg nls mitshm gif gnome mozilla png truetype ppc 
gnome-libs gdbm berkdb slang readline arts guile X sdl gpm tcpd pam ssl perl python 
esd imlib oggvorbis gtk qt motif opengl kde ipv6 tcltk fbcon aalib" 
COMPILER="gcc3" 
CHOST="powerpc-unknown-linux-gnu" 
CFLAGS="-O2 -pipe -mcpu=750 -mpowerpc-gfxopt -mmultiple -mstring" 
CXXFLAGS="-O2 -pipe -mcpu=750 -mpowerpc-gfxopt -mmultiple -mstring" 
ACCEPT_KEYWORDS="ppc" 
MAKEOPTS="-j3" 
AUTOCLEAN="yes" 
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage" 
FEATURES="ccache distcc"