Bug 116561 - local variable used before set
Summary: local variable used before set
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: zsh
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jens Petersen
QA Contact: Mike McLean
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-02-23 09:15 UTC by d.binderman
Modified: 2007-11-30 22:10 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2004-07-05 07:37:05 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description d.binderman 2004-02-23 09:15:42 UTC
Description of problem:

I just tried to compile Core2 Test1 package zsh-4.0.9-1

The compiler said

zle_thingy.c(607): remark #592: variable "modsave" is used before its
value is set

The source code is

    struct modifier modsave;
    int ret, saveflag = 0;
    char *wname = *args++;

    if (!wname) {
        if (saveflag)
            zmod = modsave;

Suggest init local variable modsave before first use.


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


How reproducible:


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


Expected results:


Additional info:

Comment 1 Jens Petersen 2004-04-09 15:58:10 UTC
I think it is worth reporting this problem to upstream
if it is still present in cvs.

Comment 2 Jens Petersen 2004-04-09 16:01:01 UTC
Not sure what it should be initialised to though?

Comment 3 Jens Petersen 2004-04-09 16:01:29 UTC
Still present in 4.2.0 btw.

Comment 5 Alan Cox 2004-06-16 16:01:59 UTC
Doesn't appear to matter - the code path is never taken

On entry  saveflag is always zero.



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