diff --git a/src/plugins/btrfs.c b/src/plugins/btrfs.c index 809e3947..2b93316e 100644 --- a/src/plugins/btrfs.c +++ b/src/plugins/btrfs.c @@ -154,7 +154,6 @@ void bd_btrfs_close (void) { } -#define UNUSED __attribute__((unused)) /** * bd_btrfs_is_tech_avail: diff --git a/src/plugins/crypto.c b/src/plugins/crypto.c index 5120ec57..830010ab 100644 --- a/src/plugins/crypto.c +++ b/src/plugins/crypto.c @@ -60,7 +60,6 @@ #define DEFAULT_LUKS2_SECTOR_SIZE 512 #endif -#define UNUSED __attribute__((unused)) /** * SECTION: crypto diff --git a/src/plugins/dm.c b/src/plugins/dm.c index 98b570a3..02302f1d 100644 --- a/src/plugins/dm.c +++ b/src/plugins/dm.c @@ -30,7 +30,6 @@ #define DM_MIN_VERSION "1.02.93" -#define UNUSED __attribute__((unused)) /** * SECTION: dm diff --git a/src/plugins/fs/btrfs.c b/src/plugins/fs/btrfs.c index 3f8567ef..83dda228 100644 --- a/src/plugins/fs/btrfs.c +++ b/src/plugins/fs/btrfs.c @@ -57,7 +57,6 @@ static guint32 fs_mode_util[BD_FS_MODE_LAST+1] = { DEPS_BTRFSTUNE_MASK, /* set-uuid */ }; -#define UNUSED __attribute__((unused)) /** * bd_fs_btrfs_is_tech_avail: diff --git a/src/plugins/fs/exfat.c b/src/plugins/fs/exfat.c index 7092f9dc..53ea3893 100644 --- a/src/plugins/fs/exfat.c +++ b/src/plugins/fs/exfat.c @@ -63,7 +63,6 @@ static guint32 fs_mode_util[BD_FS_MODE_LAST+1] = { #define CLUSTERS_PREFIX_LEN 25 -#define UNUSED __attribute__((unused)) /** * bd_fs_exfat_is_tech_avail: diff --git a/src/plugins/fs/ext.c b/src/plugins/fs/ext.c index 87a8787e..198c59b6 100644 --- a/src/plugins/fs/ext.c +++ b/src/plugins/fs/ext.c @@ -63,7 +63,6 @@ static guint32 fs_mode_util[BD_FS_MODE_LAST+1] = { DEPS_TUNE2FS_MASK /* set-uuid */ }; -#define UNUSED __attribute__((unused)) static gint8 compute_percents (guint8 pass_cur, guint8 pass_total, gint val_cur, gint val_total) { gint perc; diff --git a/src/plugins/fs/f2fs.c b/src/plugins/fs/f2fs.c index 20df63a4..83c930d2 100644 --- a/src/plugins/fs/f2fs.c +++ b/src/plugins/fs/f2fs.c @@ -70,7 +70,6 @@ static guint32 fs_mode_util[BD_FS_MODE_LAST+1] = { 0 /* set-uuid */ }; -#define UNUSED __attribute__((unused)) /* option to get version was added in 1.11.0 so we need to cover situation where the version is too old to check the version */ diff --git a/src/plugins/fs/generic.c b/src/plugins/fs/generic.c index add47012..7bc80b2a 100644 --- a/src/plugins/fs/generic.c +++ b/src/plugins/fs/generic.c @@ -40,7 +40,6 @@ #include "ntfs.h" #include "f2fs.h" -#define UNUSED __attribute__((unused)) typedef enum { diff --git a/src/plugins/fs/nilfs.c b/src/plugins/fs/nilfs.c index aec41af8..92ec3997 100644 --- a/src/plugins/fs/nilfs.c +++ b/src/plugins/fs/nilfs.c @@ -54,7 +54,6 @@ static guint32 fs_mode_util[BD_FS_MODE_LAST+1] = { DEPS_NILFSTUNE_MASK, /* set-uuid */ }; -#define UNUSED __attribute__((unused)) #ifdef __clang__ #define ZERO_INIT {} diff --git a/src/plugins/fs/ntfs.c b/src/plugins/fs/ntfs.c index f7c49773..66ea78a8 100644 --- a/src/plugins/fs/ntfs.c +++ b/src/plugins/fs/ntfs.c @@ -61,7 +61,6 @@ static guint32 fs_mode_util[BD_FS_MODE_LAST+1] = { DEPS_NTFSLABEL_MASK /* set-uuid */ }; -#define UNUSED __attribute__((unused)) /** * bd_fs_ntfs_is_tech_avail: diff --git a/src/plugins/fs/udf.c b/src/plugins/fs/udf.c index 787bea0d..b22d98c7 100644 --- a/src/plugins/fs/udf.c +++ b/src/plugins/fs/udf.c @@ -60,7 +60,6 @@ static guint32 fs_mode_util[BD_FS_MODE_LAST+1] = { DEPS_UDFLABEL_MASK, /* set-uuid */ }; -#define UNUSED __attribute__((unused)) /** * bd_fs_udf_is_tech_avail: diff --git a/src/plugins/fs/vfat.c b/src/plugins/fs/vfat.c index 3f3024ff..97390c58 100644 --- a/src/plugins/fs/vfat.c +++ b/src/plugins/fs/vfat.c @@ -63,7 +63,6 @@ static guint32 fs_mode_util[BD_FS_MODE_LAST+1] = { DEPS_FATLABELUUID_MASK, /* set-uuid */ }; -#define UNUSED __attribute__((unused)) #ifdef __clang__ #define ZERO_INIT {} diff --git a/src/plugins/fs/xfs.c b/src/plugins/fs/xfs.c index c73eb69f..0429fd82 100644 --- a/src/plugins/fs/xfs.c +++ b/src/plugins/fs/xfs.c @@ -61,7 +61,6 @@ static guint32 fs_mode_util[BD_FS_MODE_LAST+1] = { DEPS_XFS_ADMIN_MASK /* set-uuid */ }; -#define UNUSED __attribute__((unused)) #ifdef __clang__ #define ZERO_INIT {} diff --git a/src/plugins/loop.c b/src/plugins/loop.c index c7b6bb99..6407a383 100644 --- a/src/plugins/loop.c +++ b/src/plugins/loop.c @@ -75,7 +75,6 @@ void bd_loop_close (void) { /* nothing to do here */ } -#define UNUSED __attribute__((unused)) /** * bd_loop_is_tech_avail: diff --git a/src/plugins/lvm-dbus.c b/src/plugins/lvm-dbus.c index 01adbea4..dae059fb 100644 --- a/src/plugins/lvm-dbus.c +++ b/src/plugins/lvm-dbus.c @@ -97,7 +97,6 @@ static gchar *global_devices_str = NULL; #define METHOD_CALL_TIMEOUT 5000 #define PROGRESS_WAIT 500 * 1000 /* microseconds */ -#define UNUSED __attribute__((unused)) static GDBusConnection *bus = NULL; diff --git a/src/plugins/lvm.c b/src/plugins/lvm.c index 361a084b..439392e2 100644 --- a/src/plugins/lvm.c +++ b/src/plugins/lvm.c @@ -331,7 +331,6 @@ static const UtilFeatureDep features[FEATURES_LAST] = { static const gchar*const module_deps[MODULE_DEPS_LAST] = { "kvdo" }; -#define UNUSED __attribute__((unused)) /** * bd_lvm_init: diff --git a/src/plugins/mdraid.c b/src/plugins/mdraid.c index 53b7eb48..b6f64cef 100644 --- a/src/plugins/mdraid.c +++ b/src/plugins/mdraid.c @@ -179,7 +179,6 @@ void bd_md_close (void) { /* nothing to do here */ } -#define UNUSED __attribute__((unused)) /** * bd_md_is_tech_avail: diff --git a/src/plugins/nvdimm.c b/src/plugins/nvdimm.c index dd52b856..3bb3204f 100644 --- a/src/plugins/nvdimm.c +++ b/src/plugins/nvdimm.c @@ -109,7 +109,6 @@ void bd_nvdimm_close (void) { return; } -#define UNUSED __attribute__((unused)) /** * bd_nvdimm_is_tech_avail: diff --git a/src/plugins/part.c b/src/plugins/part.c index 20bb3628..164200c7 100644 --- a/src/plugins/part.c +++ b/src/plugins/part.c @@ -122,7 +122,6 @@ static gint log2i (guint x) { return ret; } -#define UNUSED __attribute__((unused)) /** * get_part_num: (skip) diff --git a/src/plugins/swap.c b/src/plugins/swap.c index d9b0f7ba..cd1acfd8 100644 --- a/src/plugins/swap.c +++ b/src/plugins/swap.c @@ -87,7 +87,6 @@ void bd_swap_close (void) { /* nothing to do here */ } -#define UNUSED __attribute__((unused)) /** * bd_swap_is_tech_avail: diff --git a/src/utils/exec.c b/src/utils/exec.c index 4acaeab3..28e7ef94 100644 --- a/src/utils/exec.c +++ b/src/utils/exec.c @@ -28,6 +28,7 @@ #include #include #include +#include "utils.h #ifdef __clang__ #define ZERO_INIT {} @@ -35,7 +36,6 @@ #define ZERO_INIT {0} #endif -#define UNUSED __attribute__((unused)) extern char **environ; diff --git a/src/utils/module.c b/src/utils/module.c index 6557c3ab..e29f2c82 100644 --- a/src/utils/module.c +++ b/src/utils/module.c @@ -24,12 +24,12 @@ #include #include #include +#include "utils.h" #include "module.h" #include "exec.h" #include "logging.h" -#define UNUSED __attribute__((unused)) /** * bd_utils_module_error_quark: (skip) diff --git a/src/utils/utils.h b/src/utils/utils.h index 801a8b6e..6df11bbf 100644 --- a/src/utils/utils.h +++ b/src/utils/utils.h @@ -9,6 +9,10 @@ #include "dbus.h" #include "logging.h" +#ifndef UNUSED +#define UNUSED __attribute__((unused)) +#endif + /** * SECTION: utils * @short_description: library providing utility functions used by the blockdev library and its plugins