diff options
author | Christian Göttsche <cgzones@googlemail.com> | 2020-09-09 21:35:15 +0200 |
---|---|---|
committer | cgzones <cgzones@googlemail.com> | 2020-09-18 12:28:40 +0200 |
commit | 7107d1db0b3361a3e880d903a45920b64a05e9d6 (patch) | |
tree | 926c71c5d2095f156bda3863fc3f8dbcacbc017f /dragonflybsd | |
parent | f4602f7b4e7fdcf4b3a5d2c0c353b50fef98aa7e (diff) |
Refactor __attribute__ usage
Use internal macros for compatibility with non GNUC compilers.
Diffstat (limited to 'dragonflybsd')
-rw-r--r-- | dragonflybsd/DragonFlyBSDProcessList.c | 4 | ||||
-rw-r--r-- | dragonflybsd/DragonFlyBSDProcessList.h | 2 |
2 files changed, 1 insertions, 5 deletions
diff --git a/dragonflybsd/DragonFlyBSDProcessList.c b/dragonflybsd/DragonFlyBSDProcessList.c index cd5526a7..8901bc45 100644 --- a/dragonflybsd/DragonFlyBSDProcessList.c +++ b/dragonflybsd/DragonFlyBSDProcessList.c @@ -22,8 +22,6 @@ in the source distribution for its full text. #include <sys/param.h> -#define _UNUSED_ __attribute__((unused)) - static int MIB_hw_physmem[2]; static int MIB_vm_stats_vm_v_page_count[4]; static int pageSize; @@ -377,7 +375,7 @@ void ProcessList_goThroughEntries(ProcessList* this) { for (int i = 0; i < count; i++) { struct kinfo_proc* kproc = &kprocs[i]; bool preExisting = false; - bool _UNUSED_ isIdleProcess = false; + bool ATTR_UNUSED isIdleProcess = false; // note: dragonflybsd kernel processes all have the same pid, so we misuse the kernel thread address to give them a unique identifier Process* proc = ProcessList_getProcess(this, kproc->kp_ktaddr ? (pid_t)kproc->kp_ktaddr : kproc->kp_pid, &preExisting, (Process_New) DragonFlyBSDProcess_new); diff --git a/dragonflybsd/DragonFlyBSDProcessList.h b/dragonflybsd/DragonFlyBSDProcessList.h index 84ab1c5a..9665a60f 100644 --- a/dragonflybsd/DragonFlyBSDProcessList.h +++ b/dragonflybsd/DragonFlyBSDProcessList.h @@ -51,8 +51,6 @@ typedef struct DragonFlyBSDProcessList_ { Hashtable *jails; } DragonFlyBSDProcessList; -#define _UNUSED_ __attribute__((unused)) - ProcessList* ProcessList_new(UsersTable* usersTable, Hashtable* pidMatchList, uid_t userId); void ProcessList_delete(ProcessList* this); |