Re: RFC: 64bit compilation warning removal

This is a discussion on Re: RFC: 64bit compilation warning removal within the OpenSSH Development forums, part of the Networking and Network Related category; On Wed, Nov 09, 2005 at 03:44:06PM -0800, Shaw Vrana wrote: > I forgot to attach any warnings ...


Go Back   Usenet Forums > Networking and Network Related > OpenSSH Development

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 11-10-2005
Darren Tucker
 
Posts: n/a
Default Re: RFC: 64bit compilation warning removal

On Wed, Nov 09, 2005 at 03:44:06PM -0800, Shaw Vrana wrote:
> I forgot to attach any warnings to my previous post. Unfortunately, the
> machine I was using has disappeared and the build stops after one
> warning. Thus, this is currently the only warning I have, but there are
> at least a handful more.
>
> ../../src/hostfile.c: In function `extract_salt':
> ../../src/hostfile.c:92: warning: unsigned int format, different type
> arg (arg 2)


Well, that one looks like just a bug in the debug() call since "ret"
is a signed int (trivial patch below).

Those macros make it harder to read, and OpenBSD doesn't have them.

Personally, I'd prefer to see the warnings fixed some other way
if possible (eg use of appropriate format specs and/or casts where
appropriate) and those changes fed back to OpenBSD.

Where necessary, those macros could be used (eg your progressmeter
example, where the 64 bit type is due to the file size in the sftp
protocol being 64 bits on the wire) and carried as a Portable-only
change. I'd be interested to hear other opinions on this, though.

Index: hostfile.c
================================================== =================
RCS file: /usr/local/src/security/openssh/cvs/openssh_cvs/hostfile.c,v
retrieving revision 1.32
diff -u -p -r1.32 hostfile.c
--- hostfile.c 2 Aug 2005 07:07:08 -0000 1.32
+++ hostfile.c 10 Nov 2005 00:15:07 -0000
@@ -88,8 +88,8 @@ extract_salt(const char *s, u_int l, cha
return (-1);
}
if (ret != SHA_DIGEST_LENGTH) {
- debug2("extract_salt: expected salt len %u, got %u",
- salt_len, ret);
+ debug2("extract_salt: expected salt len %d, got %d",
+ SHA_DIGEST_LENGTH, ret);
return (-1);
}


--
Darren Tucker (dtucker at zip.com.au)
GPG key 8FF4FA69 / D9A3 86E9 7EEE AF4B B2D4 37C9 C982 80C7 8FF4 FA69
Good judgement comes with experience. Unfortunately, the experience
usually comes from bad judgement.

_______________________________________________
openssh-unix-dev mailing list
openssh-unix-dev@mindrot.org
http://www.mindrot.org/mailman/listi...enssh-unix-dev
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 07:29 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0