Silence the remaining amd64 warnings for stuff that has WARNS set.
authorSascha Wildner <saw@online.de>
Sat, 19 Sep 2009 06:42:19 +0000 (08:42 +0200)
committerSascha Wildner <saw@online.de>
Sat, 19 Sep 2009 06:49:10 +0000 (08:49 +0200)
usr.sbin/iostat/iostat.c
usr.sbin/lpr/lpd/printjob.c
usr.sbin/memcontrol/memcontrol.c
usr.sbin/pfctl/pf_print_state.c
usr.sbin/pfctl/pfctl_parser.c
usr.sbin/pflogd/pflogd.c
usr.sbin/resident/resident.c
usr.sbin/vnconfig/vnconfig.c

index 970c5d6..5398ce1 100644 (file)
@@ -597,9 +597,9 @@ devstats(int perf_select)
                                       msdig,
                                       ms_per_transaction);
                        else 
-                               printf("%4.1qu%4.1qu%5.*Lf ",
-                                      total_blocks,
-                                      total_transfers,
+                               printf("%4.1ju%4.1ju%5.*Lf ",
+                                      (uintmax_t)total_blocks,
+                                      (uintmax_t)total_transfers,
                                       msdig,
                                       ms_per_transaction);
                } else {
@@ -612,9 +612,9 @@ devstats(int perf_select)
                                total_mb = total_bytes;
                                total_mb /= 1024 * 1024;
 
-                               printf(" %5.2Lf %3.1qu %5.2Lf ", 
+                               printf(" %5.2Lf %3.1ju %5.2Lf ",
                                       kb_per_transfer,
-                                      total_transfers,
+                                      (uintmax_t)total_transfers,
                                       total_mb);
                        }
                }
index cbb2a86..38ceb4b 100644 (file)
@@ -1111,10 +1111,10 @@ sendagain:
        copycnt++;
 
        if (copycnt < 2)
-               sprintf(buf, "%c%qd %s\n", type, stb.st_size, file);
+               sprintf(buf, "%c%jd %s\n", type, (intmax_t)stb.st_size, file);
        else
-               sprintf(buf, "%c%qd %s_c%d\n", type, stb.st_size, file,
-                       copycnt);
+               sprintf(buf, "%c%jd %s_c%d\n", type, (intmax_t)stb.st_size,
+                       file, copycnt);
        amt = strlen(buf);
        for (i = 0;  ; i++) {
                if (write(pfd, buf, amt) != amt ||
index fb03a4a..d240b40 100644 (file)
@@ -178,7 +178,8 @@ listfunc(int memfd, int argc, char *argv[])
            continue;
        if (owner && strcmp(mrd[i].mr_owner, owner))
            continue;
-       printf("%qx/%qx %.8s ", mrd[i].mr_base, mrd[i].mr_len, 
+       printf("%jx/%jx %.8s ",
+              (uintmax_t)mrd[i].mr_base, (uintmax_t)mrd[i].mr_len,
               mrd[i].mr_owner[0] ? mrd[i].mr_owner : "-");
        for (j = 0; attrnames[j].name != NULL; j++)
            if (mrd[i].mr_flags & attrnames[j].val)
index ef931c4..1144527 100644 (file)
@@ -287,7 +287,7 @@ print_state(struct pf_state *s, int opts)
        }
        if (opts & PF_OPT_VERBOSE2) {
                printf("   id: %016llx creatorid: %08x",
-                   be64toh(s->id), ntohl(s->creatorid));
+                   (unsigned long long)be64toh(s->id), ntohl(s->creatorid));
 
                printf(" synchronization: ");
                if ((s->sync_flags & PFSTATE_GOT_SYN_MASK) ==
index b9a39d7..1b8d868 100644 (file)
@@ -555,7 +555,7 @@ print_status(struct pf_status *s, int opts)
                    s->src_nodes, "");
                for (i = 0; i < SCNT_MAX; i++) {
                        printf("  %-25s %14lld ", pf_scounters[i],
-                                   s->scounters[i]);
+                                   (unsigned long long)s->scounters[i]);
                        if (runtime > 0)
                                printf("%14.1f/s\n",
                                    (double)s->scounters[i] / (double)runtime);
index 8872c89..c799a4e 100644 (file)
@@ -397,7 +397,7 @@ dump_packet_nobuf(u_char *user, const struct pcap_pkthdr *h, const u_char *sp)
        if (fwrite(h, sizeof(*h), 1, f) != 1) {
                /* try to undo header to prevent corruption */
                off_t pos = ftello(f);
-               if (pos < sizeof(*h) ||
+               if ((size_t)pos < sizeof(*h) ||
                    ftruncate(fileno(f), pos - sizeof(*h))) {
                        logmsg(LOG_ERR, "Write failed, corrupted logfile!");
                        set_suspended(1);
index ed6e8df..1b290ea 100644 (file)
@@ -89,10 +89,10 @@ list_residents(void)
        /* print the list of retrieved resident binary */
        printf("%-4s\t%-15s\t%-12s\t%-30s\n","Id", "Size", "Address", "Executable");
        for (i = 0; i < res_count; ++i) {
-               printf("%-4d\t%-15lld\t0x%-12x\t%-30s\n",
+               printf("%-4d\t%-15jd\t0x%-12x\t%-30s\n",
                        buf[i].res_id,
-                       buf[i].res_stat.st_size,
-                       buf[i].res_entry_addr,
+                       (intmax_t)buf[i].res_stat.st_size,
+                       (int)buf[i].res_entry_addr,
                        buf[i].res_file);
        }
 
index 572da8f..3335d41 100644 (file)
@@ -325,8 +325,8 @@ getinfo( const char *vname )
                                fprintf(stdout, "not in use\n");
                        else if ((strcmp(vnu.vnu_file, _VN_USER_SWAP)) == 0)
                                fprintf(stdout,
-                                       "consuming %lld VM pages\n",
-                                       vnu.vnu_size);
+                                       "consuming %jd VM pages\n",
+                                       (intmax_t)vnu.vnu_size);
                        else
                                fprintf(stdout, 
                                        "covering %s on %s, inode %ju\n",
@@ -498,7 +498,7 @@ config(struct vndisk *vnp)
                        if (verbose) {
                                printf("%s: %s, ", dev, file);
                                if (vnp->size != 0) {
-                                   printf("%lld bytes mapped\n", vnio.vn_size);
+                                   printf("%jd bytes mapped\n", (intmax_t)vnio.vn_size);
                                } else {
                                    printf("complete file mapped\n");
                                }