Skip to content

Commit c02c9d8

Browse files
committed
narrowing warning fixed
cast added to log.length to get rid of warning.
1 parent 4730dd9 commit c02c9d8

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
@@ -266,7 +266,7 @@ void
266266
KernelAPI::WriteToDnvmeLog(string log)
267267
{
268268
int rc;
269-
struct nvme_logstr logMe = { log.length(), log.c_str() };
269+
struct nvme_logstr logMe = { (short unsigned int)log.length(), log.c_str() };
270270

271271
LOG_NRM("Write custom string to dnvme's log output: \"%s\"", log.c_str());
272272
if ((rc = ioctl(gDutFd, NVME_IOCTL_MARK_SYSLOG, &logMe)) < 0) {

0 commit comments

Comments
 (0)