Bugzilla – Bug 133754
pine-4.63-9: three buglets
Last modified: 2005-12-02 09:59:30 UTC
I just tried to compile package pine-4.63-9 with the GNU C compiler. It said 1. maildir.c:1624: warning: too few arguments for format The source code is sprintf(curdir,"%s%s%s/%s", (dir ? "" : myhomedir(), dir ? "" : "/"), (dir ? realname : (maildirpath ? maildirpath : "Maildir")), (dir ? "" : ".")); Four %s specifiers, only three trailing parameters. Suggest code rework. 2. init.c:9311: warning: "fd" is used uninitialized in this function The source code is (void)close(fd); I've checked the source code, and fd is only conditionally assigned to. Suggest initialise local variable "fd" at its declaration. 3. rules.c:566: warning: "rv" is used uninitialized in this function The source code is if(rv && !condition) This is similar to the previous one. Suggest initialise local variable "rv" at its declaration.
These are all fixed in the current packages for 10.1. Our build system no longer allows code to use unitialized variables, nor the first compiler error that you mention. Thanks for the report.
(In reply to comment #1) > These are all fixed in the current packages for 10.1. Excellent. > Our build system no longer allows code to use unitialized variables, nor the > first compiler error that you mention. By "our" do you mean pine only, or all of Suse ? I'd be interested to find out how you do this extra checking. Do you just grep for certain warnings, or have you tweeked the compiler ?
By "our", I mean all of SUSE. We just grep for the warnings that we don't want to ignore...
(In reply to comment #3) > By "our", I mean all of SUSE. Thanks. > We just grep for the warnings that we don't want to ignore... Fascinating. Would you be able to show me a list of the warnings Suse looks for in their builds ?