Bug 162137

Summary: operation on 'outidx' is undefined
Product: [Fedora] Fedora Reporter: David Binderman <dcb314>
Component: festivalAssignee: Matthew Miller <mattdm>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: mattdm
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 1.96-0.11 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-03-20 19:02:02 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:
Bug Depends On: 232105    
Bug Blocks:    
Attachments:
Description Flags
the patch, for reference none

Description David Binderman 2005-06-30 09:48:19 UTC
Description of problem:

I just tried to compile package festival-1.95-3 from Redhat
Fedora Core development tree with the gcc 4.0.0 compiler and
the compiler flag -Wall.

The compiler said

rateconv.cc:387: warning: operation on 'outidx' may be undefined

The source code is

            fir_stereo(inp + inoffset + inbaseidx,
                       coep + cycctr * firlen, firlen,
                       outp + outidx++, outp + outidx++);

I agree with the compiler - this is undefined code. Suggest avoid
incrementing variable "outidx" twice between sequence points.

Better code might be

            fir_stereo(inp + inoffset + inbaseidx,
                       coep + cycctr * firlen, firlen,
                       outp + outidx, outp + outidx + 1);
            outidx += 2;



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


How reproducible:


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


Expected results:


Additional info:

Comment 1 John (J5) Palmieri 2005-06-30 14:17:13 UTC
Can you create a patch, attach it here and send it upstream?  Thanks.

Comment 2 David Binderman 2005-07-01 08:17:53 UTC
>Can you create a patch

I could, but I have no way to test the patch in the festival package.

Suggest forward bug report to upstream.

Comment 3 Matthew Miller 2007-03-13 21:00:29 UTC
I'm working on an updated package which includes this fix. Still should be sent
upstream.

Comment 4 Matthew Miller 2007-03-13 21:20:27 UTC
See bug #232105 for in-progress updated packages which address this issue.

Comment 5 Matthew Miller 2007-03-14 11:03:47 UTC
Created attachment 150027 [details]
the patch, for reference

here's the patch, for reference.

Comment 6 Matthew Miller 2007-03-20 19:02:02 UTC
This issue should be resolved by the release of festival-1.96-0.11, now in the
development tree. (See bug #232105 for details.)

Please reopen if there's still a problem. Thanks.