Bug 105841 - nss_db bad source code
nss_db bad source code
Product: Red Hat Linux
Classification: Retired
Component: nss_db (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Nalin Dahyabhai
Brian Brock
Depends On:
  Show dependency treegraph
Reported: 2003-09-28 07:20 EDT by d.binderman
Modified: 2007-04-18 12:57 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-04-22 01:03:42 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description d.binderman 2003-09-28 07:20:13 EDT
From Bugzilla Helper:
User-Agent: Mozilla/4.6 [en-gb]C-CCK-MCD NetscapeOnline.co.uk  (Win98; I)

Description of problem:

Hello there,

I just tried to compile package nss_db-2.2-20 from Redhat 9.0
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);

This is well broken. You would be better off with

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

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

How reproducible:

Steps to Reproduce:
1. compile with -Wall

Additional info
Comment 1 John Thacker 2006-04-22 01:03:42 EDT
Come on.  -Wall?

Not going to patch upstream code to quiet a compiler warning rather 
than fix a bug or error.

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