Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/crypto/external/bsd/openssh/dist Fix compiler warnings



details:   https://anonhg.NetBSD.org/src/rev/0aaaa7446add
branches:  trunk
changeset: 758958:0aaaa7446add
user:      adam <adam%NetBSD.org@localhost>
date:      Mon Nov 22 09:53:01 2010 +0000

description:
Fix compiler warnings

diffstat:

 crypto/external/bsd/openssh/dist/servconf.c   |  17 +++++++++--------
 crypto/external/bsd/openssh/dist/sftp.c       |   6 +++---
 crypto/external/bsd/openssh/dist/ssh-keygen.c |   8 ++++----
 3 files changed, 16 insertions(+), 15 deletions(-)

diffs (124 lines):

diff -r 0b7d00abaf00 -r 0aaaa7446add crypto/external/bsd/openssh/dist/servconf.c
--- a/crypto/external/bsd/openssh/dist/servconf.c       Mon Nov 22 08:54:14 2010 +0000
+++ b/crypto/external/bsd/openssh/dist/servconf.c       Mon Nov 22 09:53:01 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: servconf.c,v 1.5 2010/11/21 18:59:04 adam Exp $        */
+/*     $NetBSD: servconf.c,v 1.6 2010/11/22 09:53:01 adam Exp $        */
 /* $OpenBSD: servconf.c,v 1.209 2010/06/22 04:22:59 djm Exp $ */
 /*
  * Copyright (c) 1995 Tatu Ylonen <ylo%cs.hut.fi@localhost>, Espoo, Finland
@@ -12,7 +12,7 @@
  */
 
 #include "includes.h"
-__RCSID("$NetBSD: servconf.c,v 1.5 2010/11/21 18:59:04 adam Exp $");
+__RCSID("$NetBSD: servconf.c,v 1.6 2010/11/22 09:53:01 adam Exp $");
 #include <sys/types.h>
 #include <sys/socket.h>
 #include <sys/queue.h>
@@ -816,7 +816,8 @@
        int cmdline = 0, *intptr, value, n;
        SyslogFacility *log_facility_ptr;
        LogLevel *log_level_ptr;
-       unsigned long lvalue, *longptr;
+       unsigned long lvalue;
+       time_t *timetptr;
        ServerOpCodes opcode;
        int port = 0;
        u_int i, flags = 0;
@@ -831,7 +832,7 @@
        if (!arg || !*arg || *arg == '#')
                return 0;
        intptr = NULL;
-       longptr = NULL;
+       timetptr = NULL;
        charptr = NULL;
        opcode = parse_token(arg, filename, linenum, &flags);
 
@@ -1627,19 +1628,19 @@
                        *intptr = value;
                break;
        case sBindTimeout:
-               longptr = (unsigned long *) &options->lpk.b_timeout.tv_sec;
+               timetptr = &options->lpk.b_timeout.tv_sec;
 parse_ulong:
                arg = strdelim(&cp);
                if (!arg || *arg == '\0')
                        fatal("%s line %d: missing integer value.",
                            filename, linenum);
                lvalue = atol(arg);
-               if (*activep && *longptr == -1)
-                       *longptr = lvalue;
+               if (*activep && *timetptr == -1)
+                       *timetptr = lvalue;
                break;
 
        case sSearchTimeout:
-               longptr = (unsigned long *) &options->lpk.s_timeout.tv_sec;
+               timetptr = &options->lpk.s_timeout.tv_sec;
                goto parse_ulong;
                break;
        case sLdapConf:
diff -r 0b7d00abaf00 -r 0aaaa7446add crypto/external/bsd/openssh/dist/sftp.c
--- a/crypto/external/bsd/openssh/dist/sftp.c   Mon Nov 22 08:54:14 2010 +0000
+++ b/crypto/external/bsd/openssh/dist/sftp.c   Mon Nov 22 09:53:01 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sftp.c,v 1.4 2010/11/21 18:29:49 adam Exp $    */
+/*     $NetBSD: sftp.c,v 1.5 2010/11/22 09:53:01 adam Exp $    */
 /* $OpenBSD: sftp.c,v 1.125 2010/06/18 00:58:39 djm Exp $ */
 /*
  * Copyright (c) 2001-2004 Damien Miller <djm%openbsd.org@localhost>
@@ -17,7 +17,7 @@
  */
 
 #include "includes.h"
-__RCSID("$NetBSD: sftp.c,v 1.4 2010/11/21 18:29:49 adam Exp $");
+__RCSID("$NetBSD: sftp.c,v 1.5 2010/11/22 09:53:01 adam Exp $");
 #include <sys/types.h>
 #include <sys/ioctl.h>
 #include <sys/wait.h>
@@ -1778,7 +1778,7 @@
        struct complete_ctx *complete_ctx;
 
        lf = el_line(el);
-       if (el_get(el, EL_CLIENTDATA, (void**)&complete_ctx) != 0)
+       if (el_get(el, EL_CLIENTDATA, &complete_ctx) != 0)
                fatal("%s: el_get failed", __func__);
 
        /* Figure out which argument the cursor points to */
diff -r 0b7d00abaf00 -r 0aaaa7446add crypto/external/bsd/openssh/dist/ssh-keygen.c
--- a/crypto/external/bsd/openssh/dist/ssh-keygen.c     Mon Nov 22 08:54:14 2010 +0000
+++ b/crypto/external/bsd/openssh/dist/ssh-keygen.c     Mon Nov 22 09:53:01 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ssh-keygen.c,v 1.4 2010/11/21 18:29:49 adam Exp $      */
+/*     $NetBSD: ssh-keygen.c,v 1.5 2010/11/22 09:53:01 adam Exp $      */
 /* $OpenBSD: ssh-keygen.c,v 1.199 2010/08/16 04:06:06 djm Exp $ */
 /*
  * Author: Tatu Ylonen <ylo%cs.hut.fi@localhost>
@@ -14,7 +14,7 @@
  */
 
 #include "includes.h"
-__RCSID("$NetBSD: ssh-keygen.c,v 1.4 2010/11/21 18:29:49 adam Exp $");
+__RCSID("$NetBSD: ssh-keygen.c,v 1.5 2010/11/22 09:53:01 adam Exp $");
 #include <sys/types.h>
 #include <sys/socket.h>
 #include <sys/stat.h>
@@ -1445,7 +1445,7 @@
                if (!quiet) {
                        logit("Signed %s key %s: id \"%s\" serial %llu%s%s "
                            "valid %s", key_cert_type(public), 
-                           out, public->cert->key_id, public->cert->serial,
+                           out, public->cert->key_id, (unsigned long long)public->cert->serial,
                            cert_principals != NULL ? " for " : "",
                            cert_principals != NULL ? cert_principals : "",
                            fmt_validity(cert_valid_from, cert_valid_to));
@@ -1671,7 +1671,7 @@
            key_type(key->cert->signature_key), ca_fp);
        printf("        Key ID: \"%s\"\n", key->cert->key_id);
        if (!v00)
-               printf("        Serial: %llu\n", key->cert->serial);
+               printf("        Serial: %llu\n", (unsigned long long)key->cert->serial);
        printf("        Valid: %s\n",
            fmt_validity(key->cert->valid_after, key->cert->valid_before));
        printf("        Principals: ");



Home | Main Index | Thread Index | Old Index