Chore: fix some unused paramater/function warnings (#1324)

This commit is contained in:
apocelipes
2024-10-06 23:01:49 +08:00
committed by GitHub
parent 8855c0b851
commit 84cc9e3b15
11 changed files with 12 additions and 10 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
#include "bios.h"
const char* ffDetectBios(FFBiosResult* bios)
const char* ffDetectBios(FF_MAYBE_UNUSED FFBiosResult* bios)
{
return "Not supported on this platform";
}
@@ -202,6 +202,7 @@ const char* ffDetectBluetoothRadio(FFlist* devices /* FFBluetoothRadioResult */)
#ifdef FF_HAVE_DBUS
return detectBluetooth(devices);
#else
FF_UNUSED(devices)
return "Fastfetch was compiled without DBus support";
#endif
}
+1 -1
View File
@@ -1,6 +1,6 @@
#include "cpu.h"
const char* ffDetectCPUImpl(const FFCPUOptions* options, FFCPUResult* cpu)
const char* ffDetectCPUImpl(FF_MAYBE_UNUSED const FFCPUOptions* options, FF_MAYBE_UNUSED FFCPUResult* cpu)
{
return "Not supported on this platform";
}
+1 -1
View File
@@ -1,7 +1,7 @@
#include "fastfetch.h"
#include "detection/cpuusage/cpuusage.h"
const char* ffGetCpuUsageInfo(FFlist* cpuTimes)
const char* ffGetCpuUsageInfo(FF_MAYBE_UNUSED FFlist* cpuTimes)
{
return "Not support on this platform";
}
+1 -1
View File
@@ -1,6 +1,6 @@
#include "disk.h"
const char* ffDetectDisksImpl(FFDiskOptions* options, FFlist* disks)
const char* ffDetectDisksImpl(FF_MAYBE_UNUSED FFDiskOptions* options, FF_MAYBE_UNUSED FFlist* disks)
{
return "Not supported on this platform";
}
+1 -1
View File
@@ -1,6 +1,6 @@
#include "diskio.h"
const char* ffDiskIOGetIoCounters(FFlist* result, FFDiskIOOptions* options)
const char* ffDiskIOGetIoCounters(FF_MAYBE_UNUSED FFlist* result, FF_MAYBE_UNUSED FFDiskIOOptions* options)
{
return "Not supported on this platform";
}
+2 -1
View File
@@ -78,7 +78,7 @@ static bool pciDetectDriver(FFstrbuf* result, FFstrbuf* pciDir, FFstrbuf* buffer
return true;
}
static const char* drmFindRenderFromCard(const char* drmCardKey, FFstrbuf* result)
FF_MAYBE_UNUSED static const char* drmFindRenderFromCard(const char* drmCardKey, FFstrbuf* result)
{
char path[PATH_MAX];
sprintf(path, "/sys/class/drm/%s/device/drm", drmCardKey);
@@ -395,6 +395,7 @@ static const char* drmDetectIntelSpecific(FFGPUResult* gpu, const char* drmKey,
}
return NULL;
#else
FF_UNUSED(gpu, drmKey, buffer);
return "Fastfetch is not compiled with drm support";
#endif
}
+1 -1
View File
@@ -1,6 +1,6 @@
#include "host.h"
const char* ffDetectHost(FFHostResult* host)
const char* ffDetectHost(FF_MAYBE_UNUSED FFHostResult* host)
{
return "Not supported on this platform";
}
+1 -1
View File
@@ -1,6 +1,6 @@
#include "memory.h"
const char* ffDetectMemory(FFMemoryResult* ram)
const char* ffDetectMemory(FF_MAYBE_UNUSED FFMemoryResult* ram)
{
return "Not supported on this platform";
}
+1 -1
View File
@@ -1,6 +1,6 @@
#include "netio.h"
const char* ffNetIOGetIoCounters(FFlist* result, FFNetIOOptions* options)
const char* ffNetIOGetIoCounters(FF_MAYBE_UNUSED FFlist* result, FF_MAYBE_UNUSED FFNetIOOptions* options)
{
return "Not supported on this platform";
}
+1 -1
View File
@@ -1,5 +1,5 @@
#include "packages.h"
void ffDetectPackagesImpl(FFPackagesResult* result, FFPackagesOptions* options)
void ffDetectPackagesImpl(FF_MAYBE_UNUSED FFPackagesResult* result, FF_MAYBE_UNUSED FFPackagesOptions* options)
{
}