Skip to content

Commit 9b10617

Browse files
committed
Chore (OpenBSD): silences compiler warnings
1 parent 179539c commit 9b10617

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/detection/displayserver/linux/wmde.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ static const char* getFromProcesses(FFDisplayServerResult* result)
302302
#elif __OpenBSD__
303303
kvm_t* kd = kvm_open(NULL, NULL, NULL, KVM_NO_FILES, NULL);
304304
int count = 0;
305-
const struct kinfo_proc* proc = kvm_getprocs(kd, KERN_PROC_UID, userId, sizeof(*proc), &count);
305+
const struct kinfo_proc* proc = kvm_getprocs(kd, KERN_PROC_UID, (int) userId, sizeof(*proc), &count);
306306
if (proc)
307307
{
308308
for (int i = 0; i < count; ++i)

src/detection/gpu/gpu_obsd.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,13 @@ const char* ffDetectGPUImpl(FF_MAYBE_UNUSED const FFGPUOptions* options, FFlist*
4242
for (uint8_t func = 0; func <= maxfuncs; func++)
4343
{
4444
uint32_t pciid, pciclass;
45-
if (pciReadConf(pcifd, bus, dev, func, PCI_ID_REG, &pciid) != 0)
45+
if (pciReadConf(pcifd, (uint8_t) bus, dev, func, PCI_ID_REG, &pciid) != 0)
4646
continue;
4747

4848
if (PCI_VENDOR(pciid) == PCI_VENDOR_INVALID || PCI_VENDOR(pciid) == 0)
4949
continue;
5050

51-
if (pciReadConf(pcifd, bus, dev, func, PCI_CLASS_REG, &pciclass) != 0)
51+
if (pciReadConf(pcifd, (uint8_t) bus, dev, func, PCI_CLASS_REG, &pciclass) != 0)
5252
continue;
5353

5454
if (func == 0)

src/detection/localip/localip_linux.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -641,7 +641,7 @@ const char* ffDetectLocalIps(const FFLocalIpOptions* options, FFlist* results)
641641
ffStrCopy(ifmr.ifm_name, iface->name.chars, IFNAMSIZ);
642642
if (ioctl(sockfd, SIOCGIFMEDIA, &ifmr) == 0 && (IFM_TYPE(ifmr.ifm_active) & IFM_ETHER))
643643
{
644-
FF_DEBUG("Interface %s media type: 0x%x", iface->name.chars, IFM_SUBTYPE(ifmr.ifm_active));
644+
FF_DEBUG("Interface %s media type: 0x%x", iface->name.chars, (unsigned) IFM_SUBTYPE(ifmr.ifm_active));
645645
switch (IFM_SUBTYPE(ifmr.ifm_active))
646646
{
647647
#ifdef IFM_HPNA_1

0 commit comments

Comments
 (0)