mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-11-10 07:00:08 +01:00
Global: replaces __attribute__ to C23 [[attribute]]
This commit is contained in:
229 files changed
+619
-648
No files matched your search
@@ -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) {
|
||||
|
||||
@@ -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(¤tDisk->mountpoint, "/") || ffStrbufEqualS(¤tDisk->mountpoint, "/storage/emulated")) {
|
||||
currentDisk->type = FF_DISK_VOLUME_TYPE_REGULAR_BIT;
|
||||
} else if (ffStrbufStartsWithS(¤tDisk->mountpoint, "/mnt/media_rw/")) {
|
||||
|
||||
@@ -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";
|
||||
}
|
||||
Reference in new issue
Block a user