Date: Thu, 27 Jun 2002 02:15:06 +0200 (CEST) From: Dan Lukes <dan@obluda.cz> To: FreeBSD-gnats-submit@FreeBSD.org Subject: bin/39907: cleaning sbin/savecore code from warnings Message-ID: <200206270015.g5R0F6ps061160@obluda.cz>
next in thread | raw e-mail | index | archive | help
>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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200206270015.g5R0F6ps061160>
