Skip to content

Commit 97d27aa

Browse files
committed
narrowing warning fixed
added cast to filename.length() to remove warning
1 parent c02c9d8 commit 97d27aa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Utils/kernelAPI.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ void
6767
KernelAPI::DumpKernelMetrics(DumpFilename filename)
6868
{
6969
int rc;
70-
struct nvme_file dumpMe = { filename.length(), filename.c_str() };
70+
struct nvme_file dumpMe = { (short unsigned int)filename.length(), filename.c_str() };
7171

7272
LOG_NRM("Dump dnvme metrics to filename: %s", filename.c_str());
7373
if ((rc = ioctl(gDutFd, NVME_IOCTL_DUMP_METRICS, &dumpMe)) < 0)

0 commit comments

Comments
 (0)