Bug 110803 - bad source code
bad source code
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: gv (Show other bugs)
1
All Linux
medium Severity medium
: ---
: ---
Assigned To: Dan Williams
David Lawrence
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-11-24 11:26 EST by d.binderman
Modified: 2007-11-30 17:10 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-05-14 18:22:44 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description d.binderman 2003-11-24 11:26:03 EST
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows 98)

Description of problem:


I just tried to compile package gv-3_5_8-23 from Fedora.

The compiler said

1.

callbacks.c(1142): warning #187: use of "=" where "==" may have been 
intended

The source code is

           if ((x != p->psx) || (y != p->psy) || (buf[0]='\0')) {

Better might be

           if ((x != p->psx) 
			|| (y != p->psy) 
			|| (buf[0] == '\0')) {

2.

process.c(291): warning #175: subscript out of range

The source code is

	char *argv[3];

	/* more code */

	argv[3] = NULL;

Suggest make argv one bigger.



Version-Release number of selected component (if applicable):
gv-3_5_8-23 

How reproducible:
Always

Steps to Reproduce:
1. by inspection
2.
3.
    

Additional info:
Comment 1 Dan Williams 2004-05-14 18:22:44 EDT
(2) is fixed in -27, and (1) appears to be correct code.

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