Bug 565

Summary: gcc 3.2.3 compiler warnings for openssh-3.6.1p2 on Solaris 7
Product: Portable OpenSSH Reporter: Mark D Baushke <mdb>
Component: MiscellaneousAssignee: OpenSSH Bugzilla mailing list <openssh-bugs>
Status: CLOSED FIXED    
Severity: trivial    
Priority: P2    
Version: -current   
Hardware: SPARC   
OS: Solaris   
Attachments:
Description Flags
gcc warnings messages issued while making openssh-3.6.1p2
none
Fix a few of these
none
Updated list of gcc 3.2.3 warnings against the CVS head
none
A whole bunch more warnings on Solaris 2.5.1 to add to the list none

Description Mark D Baushke 2003-05-14 16:20:19 AEST
There are a number of compiler warnings remaining in OpenSSH
when compiled with gcc 3.2.3 under Solaris 7 on sparc sun4u hardware.
The following kinds of warnings were seen:

comparison of distinct pointer types lacks a cast
initialization from incompatible pointer type
int format, nlink_t arg (arg 5)
int format, pid_t arg (arg 4)
int format, uid_t arg (arg 2)
int format, uid_t arg (arg 3)
subscript has type char
unsigned int format, gid_t arg (arg 2)
unsigned int format, long unsigned int arg (arg 2)
unsigned int format, mode_t arg (arg 3)
Comment 1 Mark D Baushke 2003-05-14 16:22:30 AEST
Created attachment 293 [details]
gcc warnings messages issued while making openssh-3.6.1p2
Comment 2 Damien Miller 2003-05-16 16:11:28 AEST
Created attachment 304 [details]
Fix a few of these

A couple have been fixed in portable, the patch fixes a couple more.

FYI - most of the warnings in cipher.c are OpenSSL compat goop.
Comment 3 Damien Miller 2003-05-26 11:04:11 AEST
Comment on attachment 304 [details]
Fix a few of these

This patch has been applied to CVS head. Could you retry with a current
snapshot?

As mentioned previously, ignore the cipher warnings - they are OpenSSL compat
crud.
Comment 4 Mark D Baushke 2003-05-26 19:40:42 AEST
Created attachment 310 [details]
Updated list of gcc 3.2.3 warnings against the CVS head

The patch reduces many of the warnings.
An updated list of warnings is attached based on the current cvs sources.
Comment 5 Damien Miller 2003-06-04 19:12:47 AEST
The "subscript has type `char'" errors appear to be ctype.h function implemented
on your system as macros. The mac.c ones are openssl compat crap similar to
cipher*.c 

I am pretty sure that the rest have been by recent commits.
Comment 6 Ted Mittelstaedt 2003-06-25 14:12:38 AEST
Created attachment 337 [details]
A whole bunch more warnings on Solaris 2.5.1 to add to the list

I just built OpenSSH on Solaris 2.5.1 using gcc 2.95.3 and got a
number of warnings.  Some may coorespond here but I don't think so.
Enjoy!
Comment 7 Darren Tucker 2004-03-30 14:54:22 AEST
Comment on attachment 337 [details]
A whole bunch more warnings on Solaris 2.5.1 to add to the list

I re-tested -current (post-3.8p1) on Solaris 2.5.1 w/gcc 3.3.1.

>authfd.c:95: warning: implicit declaration of function `strlcpy'
These are gone.

>authfile.c: In function `key_perm_ok':
>authfile.c:517: warning: unsigned int format, long unsigned int arg (arg 2)
Gone too.

>canohost.c:96: warning: subscript has type `char'
Most of these are still there.

>channels.c:1199: warning: passing arg 4 of `getsockopt' from incompatible pointer type
>channels.c:2072: warning: passing arg 4 of `setsockopt' from incompatible pointer type
SuSv2 defines arg 4 as void *, Solaris 2.5.1 defines it as char *, hence the
warning.

>sshd.c:572: warning: unsigned int format, long unsigned int arg (arg 2)
Gone.

>sshpty.c:412: warning: unsigned int format, mode_t arg (arg 3)
>sshpty.c:415: warning: unsigned int format, mode_t arg (arg 3)
Gone.

>auth.c:434: warning: passing arg 1 of `realpath' discards qualifiers from pointer target type
Still there.

>session.c:2081: warning: implicit declaration of function `gethostname'
Solaris 2.5.1 has gethostname  but no prototype for it.

>monitor.c:1038: warning: int format, pid_t arg (arg 4)
Gone.

>ssh-rand-helper.c:254: warning: implicit declaration of function `getrusage'
No prototype for getrusage.

>ssh-rand-helper.c:535: warning: int format, uid_t arg (arg 3)
>ssh-rand-helper.c:553: warning: int format, uid_t arg (arg 2)
>ssh-rand-helper.c:592: warning: int format, uid_t arg (arg 2)
All gone.

>sftp-server.c:604: warning: implicit declaration of function `utimes'
No prototypes for utimes either.

>sftp-client.c:1046: warning: passing arg 3 of `start_progress_meter' from incompatible pointer type
Still there.

Since most of these are fixed, and most of what's left is due to missing
prototypes, I'm closing this bug.
Comment 8 Damien Miller 2004-04-14 12:24:19 AEST
Mass change of RESOLVED bugs to CLOSED