From: sstrehla Date: Mon, 20 Jul 2020 10:52:48 +0000 (+0200) Subject: Added explicit cast to unsigned long before pointer cast in ioctl mock function X-Git-Tag: collectd-5.12.0~25^2^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1733faade5b63734bae2e1b243f756381ead2fd6;p=thirdparty%2Fcollectd.git Added explicit cast to unsigned long before pointer cast in ioctl mock function --- diff --git a/src/smart_test.c b/src/smart_test.c index f458c851b..f1a01e639 100644 --- a/src/smart_test.c +++ b/src/smart_test.c @@ -41,7 +41,7 @@ int ioctl(int __fd, unsigned long int __request, ...) { va_start(valist, __request); struct nvme_admin_cmd *admin_cmd = va_arg(valist, struct nvme_admin_cmd *); va_end(valist); - void *addr = (void *)admin_cmd->addr; + void *addr = (void *)(unsigned long)admin_cmd->addr; if (admin_cmd->opcode == NVME_ADMIN_IDENTIFY) { // ioctl asked about vid