From 8f79d6ab1de92ff21d6969f2c50419e8d29fdffa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=80=9A=E6=B4=B2?= Date: Thu, 17 Oct 2024 15:39:11 +0800 Subject: [PATCH] Chore: silence some warnings --- src/common/io/io_unix.c | 2 +- src/detection/terminalshell/terminalshell.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/io/io_unix.c b/src/common/io/io_unix.c index a1a0ccd65..4cb946d0e 100644 --- a/src/common/io/io_unix.c +++ b/src/common/io/io_unix.c @@ -37,7 +37,7 @@ static void createSubfolders(const char* fileName) bool ffWriteFileData(const char* fileName, size_t dataSize, const void* data) { int openFlagsModes = O_WRONLY | O_CREAT | O_TRUNC | O_CLOEXEC; - int openFlagsRights = S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH; + mode_t openFlagsRights = S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH; int FF_AUTO_CLOSE_FD fd = open(fileName, openFlagsModes, openFlagsRights); if(fd == -1) diff --git a/src/detection/terminalshell/terminalshell.c b/src/detection/terminalshell/terminalshell.c index 45e4bb75f..f75a56951 100644 --- a/src/detection/terminalshell/terminalshell.c +++ b/src/detection/terminalshell/terminalshell.c @@ -521,7 +521,7 @@ static bool getTerminalVersionScreen(FFstrbuf* exe, FFstrbuf* version) { if(!getExeVersionRaw(exe, version)) return false; // Screen version 4.09.01 (GNU) 20-Aug-23 - ffStrbufSubstrAfter(version, strlen("Screen version ") - 1); + ffStrbufSubstrAfter(version, (uint32_t) strlen("Screen version ") - 1); ffStrbufSubstrBeforeFirstC(version, ' '); return version->length > 0; }