From 5584ad32ad89925f38dfe36f835032b62ea63a1a Mon Sep 17 00:00:00 2001 From: Mark Murray Date: Wed, 12 Dec 2001 22:46:56 +0000 Subject: [PATCH] Fix the time of an intmax_t calculation; it is unsigned. Also print it with the correct formatting (%ju, not %lld). GCC's -Wformat does not understand this, so turn on NO_WERROR. --- usr.bin/tcopy/Makefile | 2 ++ usr.bin/tcopy/tcopy.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/usr.bin/tcopy/Makefile b/usr.bin/tcopy/Makefile index 5a42f6db77bd..8a6fc55ec454 100644 --- a/usr.bin/tcopy/Makefile +++ b/usr.bin/tcopy/Makefile @@ -1,5 +1,7 @@ # @(#)Makefile 8.1 (Berkeley) 6/6/93 +# $FreeBSD$ PROG= tcopy +NO_WERROR=yes .include diff --git a/usr.bin/tcopy/tcopy.c b/usr.bin/tcopy/tcopy.c index 35848c034cdc..a3a3819a8682 100644 --- a/usr.bin/tcopy/tcopy.c +++ b/usr.bin/tcopy/tcopy.c @@ -290,7 +290,7 @@ intr(signo) fprintf(msg, "record %qu\n", lastrec); } fprintf(msg, "interrupt at file %d: record %qu\n", filen, record); - fprintf(msg, "total length: %lld bytes\n", (intmax_t)(tsize + size)); + fprintf(msg, "total length: %ju bytes\n", (uintmax_t)(tsize + size)); exit(1); }