Global: replaces __attribute__ to C23 [[attribute]]

This commit is contained in:
李通洲 committed 2026-07-11 08:14:21 +08:00
1 parent ba18705d2e
commit 61656a1a7a
229 files changed
+619 -648

No files matched your search

+3 -3
View File
@@ -54,7 +54,7 @@ static const char* detectFsLabel(struct statfs* fs, FFDisk* disk) {
return nullptr;
}
#else
static const char* detectFsLabel(FF_A_UNUSED struct statfs* fs, FF_A_UNUSED FFDisk* disk) {
static const char* detectFsLabel([[maybe_unused]] struct statfs* fs, [[maybe_unused]] FFDisk* disk) {
return "Fastfetch was compiled without libgeom support";
}
#endif
@@ -84,11 +84,11 @@ static void detectFsInfo(struct statfs* fs, FFDisk* disk) {
#define MNT_REMOVABLE 0x00000200
#endif
struct CmnAttrBuf {
struct [[gnu::packed]] CmnAttrBuf {
uint32_t length;
attrreference_t nameRef;
char nameSpace[NAME_MAX * 3 + 1];
} FF_A_PACKED;
};
void detectFsInfo(struct statfs* fs, FFDisk* disk) {
if (fs->f_flags & MNT_DONTBROWSE) {
+1 -1
View File
@@ -162,7 +162,7 @@ static void detectName(FFDisk* disk) {
#ifdef __ANDROID__
static void detectType(FF_A_UNUSED const FFlist* disks, FFDisk* currentDisk, FF_A_UNUSED struct mntent* device) {
static void detectType([[maybe_unused]] const FFlist* disks, FFDisk* currentDisk, [[maybe_unused]] struct mntent* device) {
if (ffStrbufEqualS(&currentDisk->mountpoint, "/") || ffStrbufEqualS(&currentDisk->mountpoint, "/storage/emulated")) {
currentDisk->type = FF_DISK_VOLUME_TYPE_REGULAR_BIT;
} else if (ffStrbufStartsWithS(&currentDisk->mountpoint, "/mnt/media_rw/")) {
+1 -1
View File
@@ -1,5 +1,5 @@
#include "disk.h"
const char* ffDetectDisksImpl(FF_A_UNUSED FFDiskOptions* options, FF_A_UNUSED FFlist* disks) {
const char* ffDetectDisksImpl([[maybe_unused]] FFDiskOptions* options, [[maybe_unused]] FFlist* disks) {
return "Not supported on this platform";
}