From 2bac48c26657b99eea8c08f132dbadc13fa44df9 Mon Sep 17 00:00:00 2001 From: Justin Hibbits Date: Thu, 7 Jun 2018 04:02:09 +0000 Subject: [PATCH] Print Maximum Data Transfer Size as a long rather than int PowerPC has PAGE_SIZE as a long, not an int. This causes the compiler to throw a format mismatch warning on this print. To work around the difference, print it as a long instead of an int, and force the argument to a long. Reviewed By: imp Differential Revision: https://reviews.freebsd.org/D15653 --- sbin/nvmecontrol/identify.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbin/nvmecontrol/identify.c b/sbin/nvmecontrol/identify.c index 8c11e2bad148..08cd12bc1dfb 100644 --- a/sbin/nvmecontrol/identify.c +++ b/sbin/nvmecontrol/identify.c @@ -119,7 +119,7 @@ print_controller(struct nvme_controller_data *cdata) if (cdata->mdts == 0) printf("Unlimited\n"); else - printf("%d\n", PAGE_SIZE * (1 << cdata->mdts)); + printf("%ld\n", PAGE_SIZE * (1L << cdata->mdts)); printf("Controller ID: 0x%02x\n", cdata->ctrlr_id); printf("Version: %d.%d.%d\n", (cdata->ver >> 16) & 0xffff, (cdata->ver >> 8) & 0xff,