mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-11-08 14:10:11 +01:00
Global: replaces __attribute__ to C23 [[attribute]]
This commit is contained in:
@@ -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";
|
||||
}
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user