Date: Thu, 7 Jun 2018 04:02:09 +0000 (UTC) From: Justin Hibbits <jhibbits@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334754 - head/sbin/nvmecontrol Message-ID: <201806070402.w57429U1050058@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jhibbits Date: Thu Jun 7 04:02:09 2018 New Revision: 334754 URL: https://svnweb.freebsd.org/changeset/base/334754 Log: 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 Modified: head/sbin/nvmecontrol/identify.c Modified: head/sbin/nvmecontrol/identify.c ============================================================================== --- head/sbin/nvmecontrol/identify.c Thu Jun 7 03:19:21 2018 (r334753) +++ head/sbin/nvmecontrol/identify.c Thu Jun 7 04:02:09 2018 (r334754) @@ -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,
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201806070402.w57429U1050058>