LocalIP (Linux): fix compiler warnings

This commit is contained in:
李通洲
2025-08-09 18:44:37 +08:00
parent 4588644d39
commit 2bb451d9e4
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -21,7 +21,7 @@ typedef struct FFLocalIpNIFlag
const char *name;
} FFLocalIpNIFlag;
static inline void ffLocalIpFillNIFlags(FFstrbuf *buf, uint32_t flag, const FFLocalIpNIFlag names[])
static inline void ffLocalIpFillNIFlags(FFstrbuf *buf, uint64_t flag, const FFLocalIpNIFlag names[])
{
for (const FFLocalIpNIFlag *nf = names; flag && nf->name; ++nf)
{
+2 -2
View File
@@ -87,7 +87,7 @@ static const FFLocalIpNIFlag niFlagOptions[] = {
{},
};
static void addNewIp(FFlist* list, const char* name, const char* addr, int type, bool defaultRoute, uint32_t flags, bool firstOnly)
static void addNewIp(FFlist* list, const char* name, const char* addr, int type, bool defaultRoute, uint64_t flags, bool firstOnly)
{
FFLocalIpResult* ip = NULL;
@@ -244,7 +244,7 @@ const char* ffDetectLocalIps(const FFLocalIpOptions* options, FFlist* results)
if (options->namePrefix.length && strncmp(ifa->ifa_name, options->namePrefix.chars, options->namePrefix.length) != 0)
continue;
uint32_t flags = options->showType & FF_LOCALIP_TYPE_FLAGS_BIT ? ifa->ifa_flags : 0;
uint64_t flags = options->showType & FF_LOCALIP_TYPE_FLAGS_BIT ? ifa->ifa_flags : 0;
if (ifa->ifa_addr->sa_family == AF_INET)
{