Bug 80669 - bad source code
Summary: bad source code
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: FreeWnn
Version: 8.0
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Jens Petersen
QA Contact: Bill Huang
Depends On:
TreeView+ depends on / blocked
Reported: 2002-12-29 17:15 UTC by d.binderman
Modified: 2007-04-18 16:49 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2003-04-21 13:02:17 UTC

Attachments (Terms of Use)

Description d.binderman 2002-12-29 17:15:04 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.6 [en-gb]C-CCK-MCD NetscapeOnline.co.uk  (Win98; I)

Description of problem:

Hello there,

I have just tried to compile package FreeWnn-1.11-27

I got the following messages from the compiler.

cc: Info: js.c, line 2887: In this statement, an array is being accessed outside the bounds specified for the array type. (subscrbounds)

Here is an untested patch to shut up the compiler.

./Xsi/Wnn/jlib/js.c.old ./Xsi/Wnn/jlib/js.c
*** ./Xsi/Wnn/jlib/js.c.old	Sat Dec 14 13:24:17 2002
--- ./Xsi/Wnn/jlib/js.c	Sat Dec 14 13:25:11 2002
*** 2871,2877 ****
       int cnt;
    FILE *fp;
!   static char s[6][EXPAND_PATH_LENGTH];
    char serv_defs[EXPAND_PATH_LENGTH];
    char data[1024];
    int num;
--- 2871,2877 ----
       int cnt;
    FILE *fp;
!   static char s[ 7][EXPAND_PATH_LENGTH];
    char serv_defs[EXPAND_PATH_LENGTH];
    char data[1024];
    int num;

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. copy source code onto Compaq Alpha machine.
2. compile with Compaq compiler, using flags -w0 -fast

Additional info:

Compaq compiler is not significant. Just think of it as a 
C compiler which has better warnings than the GNU compiler.

The FreeWnn source code fails to conform to the rules for ISO C.

Comment 1 Jens Petersen 2003-04-21 11:43:34 UTC
Ok, thanks for the patch.  Not sure whether this was
actually causing any problems, but I'll put the patch into
the next build.

Comment 2 Jens Petersen 2003-04-21 13:02:17 UTC
Patch added to 1.11-35.  Thanks :)

Comment 3 David Lawrence 2006-04-24 18:58:11 UTC
Adding to blocker bug 185486 and adding IBM group.

Comment 4 David Lawrence 2006-04-24 19:43:29 UTC
The last changes to these bugs were mistakenly made. Removing incorrect blocker
bug and confidential group.

Note You need to log in before you can comment on or make changes to this bug.