Bug 133757 - pcb-1.6.3-1068: local variable used before set
Summary: pcb-1.6.3-1068: local variable used before set
Status: RESOLVED FIXED
Alias: None
Product: SUSE LINUX 10.0
Classification: openSUSE
Component: Basesystem (show other bugs)
Version: Final
Hardware: All SuSE Linux 10.0
: P5 - None : Minor
Target Milestone: ---
Assignee: Dr. Werner Fink
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-11-14 21:30 UTC by David Binderman
Modified: 2005-11-15 10:38 UTC (History)
0 users

See Also:
Found By: Other
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Binderman 2005-11-14 21:30:29 UTC
I just tried to compile package pcb-1.6.3-1068 with a prerelease version
of GNU C compiler 4.1.

It said

rats.c:220: warning: "thefp" is used uninitialized in this function

The offending source code is

        FILE                    *thefp;

        MyFree(&command);
        command = EvaluateFilename(Settings.RatCommand, Settings.RatPath, filename, NULL);

                /* open pipe to stdout of command */
        if (*command == '\0' || (thefp = popen(command, "r")) == NULL)
        {
                PopenErrorMessage(command);
        }
                return(thefp);


If *command == '\0', then thefp contains rubbish, which is then returned
to the caller. Suggest initialise local variable "thefp" before first use.

BTW, the address of the author [ Thomas.Nau@rz.uni-ulm.de ] does not seem to work.
Comment 1 Dr. Werner Fink 2005-11-15 10:38:18 UTC
Fixed for next release, see pcb.sf.net
Comment 2 Dr. Werner Fink 2005-11-15 10:38:36 UTC
Fixed