Bug 105841

Summary: nss_db bad source code
Product: [Retired] Red Hat Linux Reporter: d.binderman
Component: nss_dbAssignee: Nalin Dahyabhai <nalin>
Status: CLOSED WONTFIX QA Contact: Brian Brock <bbrock>
Severity: medium Docs Contact:
Priority: medium    
Version: 9   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-04-22 05:03:42 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description d.binderman 2003-09-28 11:20:13 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 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);
                        ++instr;


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


How reproducible:
Always

Steps to Reproduce:
1. compile with -Wall
2.
3.
    

Additional info

Comment 1 John Thacker 2006-04-22 05:03:42 UTC
Come on.  -Wall?

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