Bugzilla – Bug 133757
pcb-1.6.3-1068: local variable used before set
Last modified: 2005-11-15 10:38:36 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.
Fixed for next release, see pcb.sf.net
Fixed