From 5ee6210240559cd77deca1da66216b2772d23f58 Mon Sep 17 00:00:00 2001 From: Joel Soete Date: Sat, 12 Dec 2009 19:09:31 +0000 Subject: possible fix to cgcc issue in sparse 0.4.2: Use of uninitialized value $bits in exists at /usr/bin/cgcc line 139. /usr/bin/cgcc: weird number of bits. at /usr/bin/cgcc line 139. Signed-off-by: Joel Soete Signed-off-by: Christopher Li --- cgcc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cgcc') diff --git a/cgcc b/cgcc index d37cf88..6636cc6 100755 --- a/cgcc +++ b/cgcc @@ -120,7 +120,7 @@ sub integer_types { my @types = (['SCHAR',''], ['SHRT',''], ['INT',''], ['LONG','L'], ['LONG_LONG','LL'], ['LONG_LONG_LONG','LLL']); my $result = " -D__CHAR_BIT__=$char"; - while (@types) { + while (@types && @_) { my $bits = shift @_; my ($name,$suffix) = @{ shift @types }; die "$0: weird number of bits." unless exists $pow2m1{$bits}; -- cgit v1.2.3-65-gdbad