Global: replaces __attribute__ to C23 [[attribute]]

This commit is contained in:
李通洲
2026-07-10 21:13:03 +08:00
parent ba18705d2e
commit 61656a1a7a
229 changed files with 619 additions and 648 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
#include "memory.h"
const char* ffDetectMemory(FF_A_UNUSED FFMemoryResult* ram) {
const char* ffDetectMemory([[maybe_unused]] FFMemoryResult* ram) {
return "Not supported on this platform";
}
+1 -1
View File
@@ -15,7 +15,7 @@ const char* ffDetectMemory(FFMemoryResult* ram) {
ram->bytesTotal = (uint64_t) sysconf(_SC_PHYS_PAGES) * pageSize;
ram->bytesUsed = ram->bytesTotal - (uint64_t) sysconf(_SC_AVPHYS_PAGES) * pageSize;
FF_A_CLEANUP(kstatFreeWrap) kstat_ctl_t* kc = kstat_open();
[[gnu::cleanup(kstatFreeWrap)]] kstat_ctl_t* kc = kstat_open();
if (kc != nullptr) {
kstat_t* ksp = kstat_lookup(kc, "zfs", -1, "arcstats");
if (ksp != nullptr && kstat_read(kc, ksp, nullptr) != -1) {