Bug 110900 - bad source code
bad source code
Status: CLOSED WONTFIX
Product: Fedora
Classification: Fedora
Component: nss_db (Show other bugs)
1
All Linux
medium Severity medium
: ---
: ---
Assigned To: Nalin Dahyabhai
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-11-25 07:32 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: 2006-04-21 12:50:53 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-25 07:32:42 EST
Description of problem:

I just tried to compile package nss_db-2_2-22 with  compiler
flag -Wall.

The compiler said

../db_load/db_load.c:810: warning: operation on `instr' may be 
undefined

The source code is

                        c = digitize(dbenv, *instr, &e1) << 4 |
                            digitize(dbenv, *++instr, &e2);

Much better code is

                        c = digitize(dbenv, instr[ 0], &e1) << 4 |
                            digitize(dbenv, instr[ 1], &e2);
                        ++instr;


Version-Release number of selected component (if applicable):
nss_db-2_2-22 

How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:
Comment 1 David Binderman 2004-11-24 05:17:52 EST
This code is still broken in Fedoara Core 3, nearly a 
year later.
Comment 2 John Thacker 2006-04-21 12:50:53 EDT
This is only a warning, not an error.  The code works as expected.  There's no
reason to patch upstream code just to fix a warning.

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