Skip to content

Commit e8db71f

Browse files
committed
Chore (Haiku): silence compiler warnings
1 parent 8984aa7 commit e8db71f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/common/netif/netif_haiku.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ bool ffNetifGetDefaultRouteImpl(char iface[IF_NAMESIZE + 1], uint32_t* ifIndex)
2424
return false;
2525

2626
int size = config.ifc_value;
27-
if (size == 0)
27+
if (size <= 0)
2828
return false;
2929

30-
FF_AUTO_FREE void *buffer = malloc(size);
30+
FF_AUTO_FREE void *buffer = malloc((size_t) size);
3131
if (buffer == NULL) {
3232
return false;
3333
}

src/detection/battery/battery_haiku.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ const char* parseBattery(int dfd, const char* battId, FFlist* results)
4444
return NULL;
4545
}
4646

47-
const char* ffDetectBattery(FFBatteryOptions* options, FFlist* results)
47+
const char* ffDetectBattery(FF_MAYBE_UNUSED FFBatteryOptions* options, FFlist* results)
4848
{
4949
FF_AUTO_CLOSE_DIR DIR* dir = opendir("/dev/power/acpi_battery/");
5050
if (!dir) return "opendir(/dev/power/acpi_battery) failed";

0 commit comments

Comments
 (0)