]> andersk Git - openssh.git/commitdiff
- (dtucker) [progressmeter.c scp.c sftp-server.c] Use correct casts for
authordtucker <dtucker>
Fri, 25 Nov 2005 03:44:55 +0000 (03:44 +0000)
committerdtucker <dtucker>
Fri, 25 Nov 2005 03:44:55 +0000 (03:44 +0000)
   snprintf formats, fixes warnings on some 64 bit platforms.  Patch from
   shaw at vranix.com, ok djm@

ChangeLog
progressmeter.c
scp.c
sftp-server.c

index 42877be04fdd3c3a1aa09f90feff8374e6518140..21d3c6e7293d939d1a1a61281c52373576f7f234 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,9 @@
  - (dtucker) [configure.ac] Apply tim's fix for older systems where the
    resolver state in resolv.h is "state" not "__res_state".  With slight
    modification by me to also work on old AIXes.  ok djm@
+ - (dtucker) [progressmeter.c scp.c sftp-server.c] Use correct casts for
+   snprintf formats, fixes warnings on some 64 bit platforms.  Patch from
+   shaw at vranix.com, ok djm@
 
 20051124
  - (djm) [configure.ac openbsd-compat/Makefile.in openbsd-compat/bsd-asprintf.c 
index 3cda090616f15fd22524ee668d5e57b6a23ccf00..13c51d87ef703dd0d1afeb11618d699b4680672a 100644 (file)
@@ -85,8 +85,8 @@ format_rate(char *buf, int size, off_t bytes)
                bytes = (bytes + 512) / 1024;
        }
        snprintf(buf, size, "%3lld.%1lld%c%s",
-           (int64_t) (bytes + 5) / 100,
-           (int64_t) (bytes + 5) / 10 % 10,
+           (long long) (bytes + 5) / 100,
+           (long long) (bytes + 5) / 10 % 10,
            unit[i],
            i ? "B" : " ");
 }
@@ -99,7 +99,7 @@ format_size(char *buf, int size, off_t bytes)
        for (i = 0; bytes >= 10000 && unit[i] != 'T'; i++)
                bytes = (bytes + 512) / 1024;
        snprintf(buf, size, "%4lld%c%s",
-           (int64_t) bytes,
+           (long long) bytes,
            unit[i],
            i ? "B" : " ");
 }
diff --git a/scp.c b/scp.c
index 59285abca0c073c056e08c95d184ff63ccc9f5a2..a19021f853e87d816998225a72d020aae548aea1 100644 (file)
--- a/scp.c
+++ b/scp.c
@@ -563,7 +563,7 @@ syserr:                     run_err("%s: %s", name, strerror(errno));
 #define        FILEMODEMASK    (S_ISUID|S_ISGID|S_IRWXU|S_IRWXG|S_IRWXO)
                snprintf(buf, sizeof buf, "C%04o %lld %s\n",
                    (u_int) (stb.st_mode & FILEMODEMASK),
-                   (int64_t)stb.st_size, last);
+                   (long long)stb.st_size, last);
                if (verbose_mode) {
                        fprintf(stderr, "Sending file modes: %s", buf);
                }
index e7d000cffe93bd8613ba4f088e931cf0f762eae1..4fa07e2f55ad8045ce9fb37921674a71253649c7 100644 (file)
@@ -428,7 +428,7 @@ process_read(void)
        len = get_int();
 
        TRACE("read id %u handle %d off %llu len %d", id, handle,
-           (u_int64_t)off, len);
+           (unsigned long long)off, len);
        if (len > sizeof buf) {
                len = sizeof buf;
                logit("read change len %d", len);
@@ -469,7 +469,7 @@ process_write(void)
        data = get_string(&len);
 
        TRACE("write id %u handle %d off %llu len %d", id, handle,
-           (u_int64_t)off, len);
+           (unsigned long long)off, len);
        fd = handle_to_fd(handle);
        if (fd >= 0) {
                if (lseek(fd, off, SEEK_SET) < 0) {
This page took 0.040899 seconds and 5 git commands to generate.