[PATCH] lib: fix string_get_size compile warning

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



lib/string_helpers.c: In function 'string_get_size':
lib/string_helpers.c:54: warning: format '%03lld' expects type 'long long int', but argument 4 has type 'u64'

Signed-off-by: FUJITA Tomonori <fujita.tomonori@xxxxxxxxxxxxx>
---
 lib/string_helpers.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/lib/string_helpers.c b/lib/string_helpers.c
index 35a1e53..8347925 100644
--- a/lib/string_helpers.c
+++ b/lib/string_helpers.c
@@ -51,7 +51,8 @@ int string_get_size(u64 size, const enum string_size_units units,
 	if (j) {
 		remainder *= 1000;
 		do_div(remainder, divisor[units]);
-		snprintf(tmp, sizeof(tmp), ".%03lld", remainder);
+		snprintf(tmp, sizeof(tmp), ".%03lld",
+			 (unsigned long long)remainder);
 		tmp[j+1] = '\0';
 	}
 
-- 
1.5.4.2

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux