From 97d27aa616c1085c1765140833b9b35004101b5b Mon Sep 17 00:00:00 2001 From: jmasucci Date: Mon, 23 Dec 2013 12:32:44 -0500 Subject: [PATCH] narrowing warning fixed added cast to filename.length() to remove warning --- Utils/kernelAPI.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Utils/kernelAPI.cpp b/Utils/kernelAPI.cpp index d57bafd..5bc6cf6 100644 --- a/Utils/kernelAPI.cpp +++ b/Utils/kernelAPI.cpp @@ -67,7 +67,7 @@ void KernelAPI::DumpKernelMetrics(DumpFilename filename) { int rc; - struct nvme_file dumpMe = { filename.length(), filename.c_str() }; + struct nvme_file dumpMe = { (short unsigned int)filename.length(), filename.c_str() }; LOG_NRM("Dump dnvme metrics to filename: %s", filename.c_str()); if ((rc = ioctl(gDutFd, NVME_IOCTL_DUMP_METRICS, &dumpMe)) < 0)