diff mbox

[2/2] silence compiler warnings

Message ID 20101203204103.GA9834@merit.edu (mailing list archive)
State RFC, archived
Headers show

Commit Message

Jim Rees Dec. 3, 2010, 8:41 p.m. UTC
None
diff mbox

Patch

diff --git a/utils/blkmapd/device-process.c b/utils/blkmapd/device-process.c
index 0d8705f..91b0afc 100644
--- a/utils/blkmapd/device-process.c
+++ b/utils/blkmapd/device-process.c
@@ -53,14 +53,13 @@  static char *pretty_sig(char *sig, uint32_t siglen)
 {
 	static char rs[100];
 	uint64_t sigval;
+	unsigned int i;
 
 	if (siglen <= sizeof(sigval)) {
-		int i;
-
 		sigval = 0;
 		for (i = 0; i < siglen; i++)
 			sigval |= ((unsigned char *)sig)[i] << (i * 8);
-		sprintf(rs, "0x%0llx", sigval);
+		sprintf(rs, "0x%0llx", (unsigned long long) sigval);
 	} else {
 		if (siglen > sizeof rs - 4) {
 			siglen = sizeof rs - 4;