Bug 133754

Summary: pine-4.63-9: three buglets
Product: [openSUSE] SUSE LINUX 10.0 Reporter: David Binderman <dcb314>
Component: BasesystemAssignee: Gary Ekker <gekker>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Minor    
Priority: P5 - None    
Version: Final   
Target Milestone: ---   
Hardware: All   
OS: SuSE Linux 10.0   
Whiteboard:
Found By: Other Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description David Binderman 2005-11-14 21:24:54 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.
Comment 1 Gary Ekker 2005-11-22 17:30:30 UTC
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.
Comment 2 David Binderman 2005-11-22 19:49:56 UTC
(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 ?



Comment 3 Gary Ekker 2005-12-01 20:34:22 UTC
By "our", I mean all of SUSE.

We just grep for the warnings that we don't want to ignore...
Comment 4 David Binderman 2005-12-02 09:59:30 UTC
(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 ?