Global: unifies GCC attributes usage

This commit is contained in:
Carter Li
2026-04-09 16:20:59 +08:00
committed by 李通洲
parent 3e69361196
commit f6a363f7ad
233 changed files with 516 additions and 545 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
#include "fastfetch.h"
#include "detection/cpuusage/cpuusage.h"
const char* ffGetCpuUsageInfo(FF_MAYBE_UNUSED FFlist* cpuTimes) {
const char* ffGetCpuUsageInfo(FF_A_UNUSED FFlist* cpuTimes) {
return "Not support on this platform";
}
+1 -1
View File
@@ -12,7 +12,7 @@ static inline void kstatFreeWrap(kstat_ctl_t** pkc) {
}
const char* ffGetCpuUsageInfo(FFlist* cpuTimes) {
__attribute__((__cleanup__(kstatFreeWrap))) kstat_ctl_t* kc = kstat_open();
FF_A_CLEANUP(kstatFreeWrap) kstat_ctl_t* kc = kstat_open();
if (!kc) {
return "kstat_open() failed";
}