Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 162369 - undefined code
Summary: undefined code
Alias: None
Product: Fedora
Classification: Fedora
Component: libdv
Version: rawhide
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Warren Togami
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2005-07-03 12:00 UTC by David Binderman
Modified: 2007-11-30 22:11 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2005-07-04 02:52:26 UTC

Attachments (Terms of Use)

Description David Binderman 2005-07-03 12:00:10 UTC
Description of problem:

I just tried to compile package libdv-0.103-4 from Redhat
Fedora Core development tree with the gcc 4.0.0 compiler and
the compiler flag -Wall.

The compiler said

encode.c:1754: warning: operation on 'i' may be undefined

The source code is

	dv_enc->img_y[i] = CLAMP(dv_enc->img_y[i++], -224, 214)

I agree with the compiler. Suggest rework code to avoid reading from
variable "i" at the same time as incrementing it.


	(dv_enc->img_y[i] = CLAMP( dv_enc->img_y[i], -224, 214)), ++i

is better code.

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

How reproducible:

Steps to Reproduce:
Actual results:

Expected results:

Additional info:

Comment 1 Warren Togami 2005-07-04 02:52:26 UTC
Could you please submit this to the upstream project?  It is not worth the
effort to fix trivial issues like this that seemingly have no security or even
functional impact.

Comment 2 David Binderman 2005-07-04 10:53:04 UTC
>Could you please submit this to the upstream project?  

Would like to be able to, but sorry I am unable.

Suggest either we forget about this trivial bug, or we can 
leave it hanging for someone else to pick up.

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