summarylogtreecommitdiffstats
path: root/fix-infinite-loop-on-powerpc.patch
blob: 1efde8843b9ea480b067bb740c4ea89bf453493d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
Description: Fix infinite loop on powerpc
 On the ppc C compiler, char is an unsigned data type. This means that
 no variable of type char can ever compare equal to the int value -1. gcc
 tries to warn you about this when you compile tcpick, by saying:
 .
 args.c:195: warning: comparison is always true due to limited range of
 data type
 .
 tcpick therefore never makes it past the getopt loop. The following
 patch fixes the problem.
Author: Alan Curry <pacman@world.std.com>
Origin: other, https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=327327#5
Bug-Debian: http://bugs.debian.org/327327
Last-Update: 2005-09-09

--- a/src/args.c
+++ b/src/args.c
@@ -149,7 +149,7 @@ parse_display_rebuild ( char * s )
 void
 parse_args(int argc, char ** argv)
 {
-	char opt;
+	int opt;
 
 #ifdef HAVE_GETOPT_LONG
 	static struct option long_options[]=