From owner-freebsd-bugs Wed Jun 26 18: 1:23 2002 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 1CD3E37D56C for ; Wed, 26 Jun 2002 17:50:02 -0700 (PDT) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.4/8.12.4) with ESMTP id g5R0o2JU095097 for ; Wed, 26 Jun 2002 17:50:02 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.4/8.12.4/Submit) id g5R0o2r4095096; Wed, 26 Jun 2002 17:50:02 -0700 (PDT) Received: from xkulesh.vol.cz (xkulesh.vol.cz [195.250.154.106]) by hub.freebsd.org (Postfix) with ESMTP id F0E5037D0E0 for ; Wed, 26 Jun 2002 17:37:33 -0700 (PDT) Received: from obluda.cz (localhost [127.0.0.1]) by xkulesh.vol.cz (8.12.3/8.12.3) with ESMTP id g5R0bVTx061818 for ; Thu, 27 Jun 2002 02:37:31 +0200 (CEST) (envelope-from dan@obluda.cz) Received: (from root@localhost) by obluda.cz (8.12.4/8.12.4/Submit) id g5R0F6ps061160; Thu, 27 Jun 2002 02:15:06 +0200 (CEST) Message-Id: <200206270015.g5R0F6ps061160@obluda.cz> Date: Thu, 27 Jun 2002 02:15:06 +0200 (CEST) From: Dan Lukes Reply-To: Dan Lukes To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: bin/39907: cleaning sbin/savecore code from warnings Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 39907 >Category: bin >Synopsis: cleaning sbin/savecore code from warnings >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Wed Jun 26 17:50:02 PDT 2002 >Closed-Date: >Last-Modified: >Originator: Dan Lukes >Release: FreeBSD 4.6-STABLE i386 >Organization: Obludarium >Environment: System: FreeBSD xkulesh.vol.cz 4.6-STABLE FreeBSD src/sbin/savecore/savecore.c,v 1.28.2.13 2002/04/07 21:17:50 >Description: sbin/savecore/savecore.c: In function `dump_exists': 354: warning: unsigned int format, u_long arg (arg 3) 354: warning: unsigned int format, u_long arg (arg 4) /usr/src/sbin/savecore/savecore.c: In function `save_core': 420: warning: int format, different type arg (arg 2) dumpsize is (off_t) e.g. (_BSD_OFF_T) e.g. (__int64_t) e.g. (long long) >How-To-Repeat: N/A >Fix: --- sbin/savecore/savecore.c.ORIG Mon Apr 8 01:16:19 2002 +++ sbin/savecore/savecore.c Thu Jun 27 02:12:31 2002 @@ -350,7 +350,7 @@ (off_t)(dumplo + ok(dump_nl[X_DUMPMAG].n_value)), L_SET); if (newdumpmag != dumpmag) { if (verbose) - syslog(LOG_WARNING, "magic number mismatch (%x != %x)", + syslog(LOG_WARNING, "magic number mismatch (%lx != %lx)", newdumpmag, dumpmag); syslog(LOG_WARNING, "no core dump"); return (0); @@ -417,7 +417,7 @@ syslog(LOG_NOTICE, "writing %score to %s", compress ? "compressed " : "", path); for (; dumpsize > 0; dumpsize -= nr) { - (void)printf("%6dK\r", dumpsize / 1024); + (void)printf("%6lldK\r", dumpsize / 1024); (void)fflush(stdout); nr = read(dumpfd, buf, MIN(dumpsize, sizeof(buf))); if (nr <= 0) { >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message