Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 2 Jan 2013 18:05:31 +0000 (UTC)
From:      Adrian Chadd <adrian@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r244961 - head/tools/tools/ath/athdebug
Message-ID:  <201301021805.r02I5aGC036317@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: adrian
Date: Wed Jan  2 18:05:31 2013
New Revision: 244961
URL: http://svnweb.freebsd.org/changeset/base/244961

Log:
  Fix some printf() formats.
  
  Found by:	clang

Modified:
  head/tools/tools/ath/athdebug/athdebug.c

Modified: head/tools/tools/ath/athdebug/athdebug.c
==============================================================================
--- head/tools/tools/ath/athdebug/athdebug.c	Wed Jan  2 18:03:19 2013	(r244960)
+++ head/tools/tools/ath/athdebug/athdebug.c	Wed Jan  2 18:05:31 2013	(r244961)
@@ -206,20 +206,20 @@ main(int argc, char *argv[])
 						bit = strtoul(cp, NULL, 0);
 					else
 						errx(1, "unknown flag %.*s",
-							tp-cp, cp);
+							(int) (tp-cp), cp);
 				}
 				ndebug = bit;
 			}
 		} while (*(cp = tp) != '\0');
 	}
 	if (debug != ndebug) {
-		printf("%s: 0x%x => ", oid, debug);
+		printf("%s: 0x%llx => ", oid, (long long) debug);
 		if (sysctlbyname(oid, NULL, NULL, &ndebug, sizeof(ndebug)) < 0)
 			err(1, "sysctl-set(%s)", oid);
-		printf("0x%x", ndebug);
+		printf("0x%llx", (long long) ndebug);
 		debug = ndebug;
 	} else
-		printf("%s: 0x%x", oid, debug);
+		printf("%s: 0x%llx", oid, (long long) debug);
 	sep = "<";
 	for (i = 0; i < N(flags); i++)
 		if (debug & flags[i].bit) {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201301021805.r02I5aGC036317>