OpenSSH
[Top] [All Lists]

[PATCH 5/6] Fix "format '%llu' expects type 'long long unsigned int'" wa

To: openssh-unix-dev@mindrot.org
Subject: [PATCH 5/6] Fix "format '%llu' expects type 'long long unsigned int'" warnings
From: "Dmitry V. Levin" <ldv@altlinux.org>
Date: Wed, 11 Apr 2007 03:40:18 +0400
Delivered-to: sp-com-lists@consult.net
Delivered-to: openssh-unix-dev-list1@securepoint.com
Delivered-to: openssh-unix-dev-tmda@mindrot.org
Delivered-to: openssh-unix-dev@mindrot.org
In-reply-to: <20070410233107.GA4984@nomad.office.altlinux.org>
List-archive: <http://lists.mindrot.org/pipermail/openssh-unix-dev>
List-help: <mailto:openssh-unix-dev-request@mindrot.org?subject=help>
List-id: Development of portable OpenSSH <openssh-unix-dev.mindrot.org>
List-post: <mailto:openssh-unix-dev@mindrot.org>
List-subscribe: <http://lists.mindrot.org/mailman/listinfo/openssh-unix-dev>, <mailto:openssh-unix-dev-request@mindrot.org?subject=subscribe>
List-unsubscribe: <http://lists.mindrot.org/mailman/listinfo/openssh-unix-dev>, <mailto:openssh-unix-dev-request@mindrot.org?subject=unsubscribe>
Mail-followup-to: openssh-unix-dev@mindrot.org
References: <20070410233107.GA4984@nomad.office.altlinux.org>
Sender: openssh-unix-dev-bounces+openssh-unix-dev-list1=securepoint.com@mindrot.org
---
 openssh/sftp-server.c |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

--- a/openssh/sftp-server.c
+++ b/openssh/sftp-server.c
@@ -319,7 +319,8 @@ handle_log_close(int handle, char *emsg)
                logit("%s%sclose \"%s\" bytes read %llu written %llu",
                    emsg == NULL ? "" : emsg, emsg == NULL ? "" : " ",
                    handle_to_name(handle),
-                   handle_bytes_read(handle), handle_bytes_write(handle));
+                   (unsigned long long) handle_bytes_read(handle),
+                   (unsigned long long) handle_bytes_write(handle));
        } else {
                logit("%s%sclosedir \"%s\"",
                    emsg == NULL ? "" : emsg, emsg == NULL ? "" : " ",
@@ -702,7 +703,8 @@ process_setstat(void)
        a = get_attrib();
        debug("request %u: setstat name \"%s\"", id, name);
        if (a->flags & SSH2_FILEXFER_ATTR_SIZE) {
-               logit("set \"%s\" size %llu", name, a->size);
+               logit("set \"%s\" size %llu",
+                   name, (unsigned long long) a->size);
                ret = truncate(name, a->size);
                if (ret == -1)
                        status = errno_to_portable(errno);
@@ -754,7 +756,8 @@ process_fsetstat(void)
                char *name = handle_to_name(handle);
 
                if (a->flags & SSH2_FILEXFER_ATTR_SIZE) {
-                       logit("set \"%s\" size %llu", name, a->size);
+                       logit("set \"%s\" size %llu",
+                           name, (unsigned long long) a->size);
                        ret = ftruncate(fd, a->size);
                        if (ret == -1)
                                status = errno_to_portable(errno);

-- 
ldv

Attachment: pgpSFWayrp3G5.pgp
Description: PGP signature

_______________________________________________
openssh-unix-dev mailing list
openssh-unix-dev@mindrot.org
http://lists.mindrot.org/mailman/listinfo/openssh-unix-dev
<Prev in Thread] Current Thread [Next in Thread>