From: Alasdair Kergon Date: Fri, 9 Jul 2010 15:34:40 +0000 (+0000) Subject: Use __attribute__ consistently throughout. X-Git-Tag: v2_02_91~1695 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=08f1ddea6c5d3679fe44e8fef73e8c8f3b11d705;p=lvm2.git Use __attribute__ consistently throughout. --- diff --git a/WHATS_NEW b/WHATS_NEW index 4b7f47314..86a71546b 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -1,5 +1,6 @@ Version 2.02.71 - =============================== + Use __attribute__ consistently throughout. Fix redundant declarations and always compile with -Wredundant-decls. Fix possible hang when all mirror images of a mirrored log fail. Do not log backtrace in valid _lv_resume() code path. diff --git a/daemons/cmirrord/clogd.c b/daemons/cmirrord/clogd.c index 95532688f..ee5e4dadf 100644 --- a/daemons/cmirrord/clogd.c +++ b/daemons/cmirrord/clogd.c @@ -32,7 +32,7 @@ static void daemonize(void); static void init_all(void); static void cleanup_all(void); -int main(int argc __attribute((unused)), char *argv[] __attribute((unused))) +int main(int argc __attribute__((unused)), char *argv[] __attribute__((unused))) { daemonize(); @@ -60,7 +60,7 @@ int main(int argc __attribute((unused)), char *argv[] __attribute((unused))) * @sig: the signal * */ -static void parent_exit_handler(int sig __attribute((unused))) +static void parent_exit_handler(int sig __attribute__((unused))) { exit_now = 1; } diff --git a/daemons/cmirrord/cluster.c b/daemons/cmirrord/cluster.c index c26692713..dddaec93d 100644 --- a/daemons/cmirrord/cluster.c +++ b/daemons/cmirrord/cluster.c @@ -215,7 +215,7 @@ static struct clog_request *get_matching_rq(struct clog_request *rq, } static char rq_buffer[DM_ULOG_REQUEST_SIZE]; -static int handle_cluster_request(struct clog_cpg *entry __attribute((unused)), +static int handle_cluster_request(struct clog_cpg *entry __attribute__((unused)), struct clog_request *rq, int server) { int r = 0; @@ -855,7 +855,7 @@ static int resend_requests(struct clog_cpg *entry) return r; } -static int do_cluster_work(void *data __attribute((unused))) +static int do_cluster_work(void *data __attribute__((unused))) { int r = SA_AIS_OK; struct clog_cpg *entry, *tmp; @@ -927,8 +927,8 @@ static int flush_startup_list(struct clog_cpg *entry) return 0; } -static void cpg_message_callback(cpg_handle_t handle, const struct cpg_name *gname __attribute((unused)), - uint32_t nodeid, uint32_t pid __attribute((unused)), +static void cpg_message_callback(cpg_handle_t handle, const struct cpg_name *gname __attribute__((unused)), + uint32_t nodeid, uint32_t pid __attribute__((unused)), void *msg, size_t msg_len) { int i; @@ -1366,7 +1366,7 @@ static void cpg_leave_callback(struct clog_cpg *match, } } -static void cpg_config_callback(cpg_handle_t handle, const struct cpg_name *gname __attribute((unused)), +static void cpg_config_callback(cpg_handle_t handle, const struct cpg_name *gname __attribute__((unused)), const struct cpg_address *member_list, size_t member_list_entries, const struct cpg_address *left_list, diff --git a/daemons/cmirrord/compat.c b/daemons/cmirrord/compat.c index a0ff809a5..3f7a9b51d 100644 --- a/daemons/cmirrord/compat.c +++ b/daemons/cmirrord/compat.c @@ -21,7 +21,7 @@ */ #define COMPAT_OFFSET 256 -static void v5_data_endian_switch(struct clog_request *rq, int to_network __attribute((unused))) +static void v5_data_endian_switch(struct clog_request *rq, int to_network __attribute__((unused))) { int i, end; int64_t *pi64; diff --git a/daemons/cmirrord/functions.c b/daemons/cmirrord/functions.c index 92d752c23..2ecd6b335 100644 --- a/daemons/cmirrord/functions.c +++ b/daemons/cmirrord/functions.c @@ -290,7 +290,7 @@ static int write_log(struct log_c *lc) } /* FIXME Rewrite this function taking advantage of the udev changes (where in use) to improve its efficiency! */ -static int find_disk_path(char *major_minor_str, char *path_rtn, int *unlink_path __attribute((unused))) +static int find_disk_path(char *major_minor_str, char *path_rtn, int *unlink_path __attribute__((unused))) { int r; DIR *dp; @@ -1369,7 +1369,7 @@ static int clog_get_sync_count(struct dm_ulog_request *rq, uint32_t originator) return 0; } -static int core_status_info(struct log_c *lc __attribute((unused)), struct dm_ulog_request *rq) +static int core_status_info(struct log_c *lc __attribute__((unused)), struct dm_ulog_request *rq) { int r; char *data = (char *)rq->data; diff --git a/daemons/cmirrord/local.c b/daemons/cmirrord/local.c index 5a8692bf3..9e076c42a 100644 --- a/daemons/cmirrord/local.c +++ b/daemons/cmirrord/local.c @@ -214,7 +214,7 @@ static int kernel_send_helper(void *data, uint16_t out_size) * * Returns: 0 on success, -EXXX on failure */ -static int do_local_work(void *data __attribute((unused))) +static int do_local_work(void *data __attribute__((unused))) { int r; struct clog_request *rq; diff --git a/daemons/dmeventd/dmeventd.c b/daemons/dmeventd/dmeventd.c index 23cc4689d..1d79f98db 100644 --- a/daemons/dmeventd/dmeventd.c +++ b/daemons/dmeventd/dmeventd.c @@ -476,14 +476,14 @@ static void _exit_dm_lib(void) dm_lib_exit(); } -static void _exit_timeout(void *unused __attribute((unused))) +static void _exit_timeout(void *unused __attribute__((unused))) { _timeout_running = 0; pthread_mutex_unlock(&_timeout_mutex); } /* Wake up monitor threads every so often. */ -static void *_timeout_thread(void *unused __attribute((unused))) +static void *_timeout_thread(void *unused __attribute__((unused))) { struct timespec timeout; time_t curr_time; @@ -1492,7 +1492,7 @@ static void _cleanup_unused_threads(void) _unlock_mutex(); } -static void _sig_alarm(int signum __attribute((unused))) +static void _sig_alarm(int signum __attribute__((unused))) { pthread_testcancel(); } @@ -1524,7 +1524,7 @@ static void _init_thread_signals(void) * Set the global variable which the process should * be watching to determine when to exit. */ -static void _exit_handler(int sig __attribute((unused))) +static void _exit_handler(int sig __attribute__((unused))) { /* * We exit when '_exit_now' is set. diff --git a/daemons/dmeventd/plugins/lvm2/dmeventd_lvm.c b/daemons/dmeventd/plugins/lvm2/dmeventd_lvm.c index bc72d5396..cf627514f 100644 --- a/daemons/dmeventd/plugins/lvm2/dmeventd_lvm.c +++ b/daemons/dmeventd/plugins/lvm2/dmeventd_lvm.c @@ -49,9 +49,9 @@ static pthread_mutex_t _event_mutex = PTHREAD_MUTEX_INITIALIZER; * configurable and we don't have that option yet */ static void _temporary_log_fn(int level, - const char *file __attribute((unused)), - int line __attribute((unused)), - int dm_errno __attribute((unused)), + const char *file __attribute__((unused)), + int line __attribute__((unused)), + int dm_errno __attribute__((unused)), const char *message) { level &= ~(_LOG_STDERR | _LOG_ONCE); diff --git a/daemons/dmeventd/plugins/mirror/dmeventd_mirror.c b/daemons/dmeventd/plugins/mirror/dmeventd_mirror.c index 0e24dca03..14a8063a0 100644 --- a/daemons/dmeventd/plugins/mirror/dmeventd_mirror.c +++ b/daemons/dmeventd/plugins/mirror/dmeventd_mirror.c @@ -167,8 +167,8 @@ static int _remove_failed_devices(const char *device) } void process_event(struct dm_task *dmt, - enum dm_event_mask event __attribute((unused)), - void **unused __attribute((unused))) + enum dm_event_mask event __attribute__((unused)), + void **unused __attribute__((unused))) { void *next = NULL; uint64_t start, length; @@ -224,10 +224,10 @@ void process_event(struct dm_task *dmt, } int register_device(const char *device, - const char *uuid __attribute((unused)), - int major __attribute((unused)), - int minor __attribute((unused)), - void **unused __attribute((unused))) + const char *uuid __attribute__((unused)), + int major __attribute__((unused)), + int minor __attribute__((unused)), + void **unused __attribute__((unused))) { int r = dmeventd_lvm2_init(); syslog(LOG_INFO, "Monitoring mirror device %s for events.", device); @@ -235,10 +235,10 @@ int register_device(const char *device, } int unregister_device(const char *device, - const char *uuid __attribute((unused)), - int major __attribute((unused)), - int minor __attribute((unused)), - void **unused __attribute((unused))) + const char *uuid __attribute__((unused)), + int major __attribute__((unused)), + int minor __attribute__((unused)), + void **unused __attribute__((unused))) { syslog(LOG_INFO, "No longer monitoring mirror device %s for events.", device); diff --git a/daemons/dmeventd/plugins/snapshot/dmeventd_snapshot.c b/daemons/dmeventd/plugins/snapshot/dmeventd_snapshot.c index 3c85c6d57..fe756bee8 100644 --- a/daemons/dmeventd/plugins/snapshot/dmeventd_snapshot.c +++ b/daemons/dmeventd/plugins/snapshot/dmeventd_snapshot.c @@ -70,7 +70,7 @@ static void _parse_snapshot_params(char *params, struct snap_status *status) } void process_event(struct dm_task *dmt, - enum dm_event_mask event __attribute((unused)), + enum dm_event_mask event __attribute__((unused)), void **private) { void *next = NULL; @@ -113,9 +113,9 @@ out: } int register_device(const char *device, - const char *uuid __attribute((unused)), - int major __attribute((unused)), - int minor __attribute((unused)), + const char *uuid __attribute__((unused)), + int major __attribute__((unused)), + int minor __attribute__((unused)), void **private) { int *percent_warning = (int*)private; @@ -128,10 +128,10 @@ int register_device(const char *device, } int unregister_device(const char *device, - const char *uuid __attribute((unused)), - int major __attribute((unused)), - int minor __attribute((unused)), - void **unused __attribute((unused))) + const char *uuid __attribute__((unused)), + int major __attribute__((unused)), + int minor __attribute__((unused)), + void **unused __attribute__((unused))) { syslog(LOG_INFO, "No longer monitoring snapshot %s\n", device); diff --git a/lib/activate/dev_manager.c b/lib/activate/dev_manager.c index bdd403209..7de341e53 100644 --- a/lib/activate/dev_manager.c +++ b/lib/activate/dev_manager.c @@ -1752,7 +1752,7 @@ int dev_manager_device_uses_vg(struct device *dev, { struct dm_tree *dtree; struct dm_tree_node *root; - char dlid[sizeof(UUID_PREFIX) + sizeof(struct id) - 1] __attribute((aligned(8))); + char dlid[sizeof(UUID_PREFIX) + sizeof(struct id) - 1] __attribute__((aligned(8))); int r = 1; if (!(dtree = dm_tree_create())) { diff --git a/lib/cache/lvmcache.c b/lib/cache/lvmcache.c index a7b11cc68..5a9c3f297 100644 --- a/lib/cache/lvmcache.c +++ b/lib/cache/lvmcache.c @@ -90,7 +90,7 @@ static void _free_cached_vgmetadata(struct lvmcache_vginfo *vginfo) */ static void _store_metadata(struct volume_group *vg, unsigned precommitted) { - char uuid[64] __attribute((aligned(8))); + char uuid[64] __attribute__((aligned(8))); struct lvmcache_vginfo *vginfo; int size; @@ -275,7 +275,7 @@ int lvmcache_verify_lock_order(const char *vgname) return 1; } -void lvmcache_lock_vgname(const char *vgname, int read_only __attribute((unused))) +void lvmcache_lock_vgname(const char *vgname, int read_only __attribute__((unused))) { if (!_lock_hash && !lvmcache_init()) { log_error("Internal cache initialisation failed"); @@ -374,7 +374,7 @@ const struct format_type *fmt_from_vgname(const char *vgname, const char *vgid) struct dm_list *devh, *tmp; struct dm_list devs; struct device_list *devl; - char vgid_found[ID_LEN + 1] __attribute((aligned(8))); + char vgid_found[ID_LEN + 1] __attribute__((aligned(8))); if (!(vginfo = vginfo_from_vgname(vgname, vgid))) return NULL; @@ -411,7 +411,7 @@ const struct format_type *fmt_from_vgname(const char *vgname, const char *vgid) struct lvmcache_vginfo *vginfo_from_vgid(const char *vgid) { struct lvmcache_vginfo *vginfo; - char id[ID_LEN + 1] __attribute((aligned(8))); + char id[ID_LEN + 1] __attribute__((aligned(8))); if (!_vgid_hash || !vgid) return NULL; @@ -492,7 +492,7 @@ static int _vginfo_is_invalid(struct lvmcache_vginfo *vginfo) struct lvmcache_info *info_from_pvid(const char *pvid, int valid_only) { struct lvmcache_info *info; - char id[ID_LEN + 1] __attribute((aligned(8))); + char id[ID_LEN + 1] __attribute__((aligned(8))); if (!_pvid_hash || !pvid) return NULL; @@ -930,8 +930,8 @@ static int _insert_vginfo(struct lvmcache_vginfo *new_vginfo, const char *vgid, struct lvmcache_vginfo *primary_vginfo) { struct lvmcache_vginfo *last_vginfo = primary_vginfo; - char uuid_primary[64] __attribute((aligned(8))); - char uuid_new[64] __attribute((aligned(8))); + char uuid_primary[64] __attribute__((aligned(8))); + char uuid_new[64] __attribute__((aligned(8))); int use_new = 0; /* Pre-existing VG takes precedence. Unexported VG takes precedence. */ @@ -1219,7 +1219,7 @@ int lvmcache_update_vg(struct volume_group *vg, unsigned precommitted) { struct pv_list *pvl; struct lvmcache_info *info; - char pvid_s[ID_LEN + 1] __attribute((aligned(8))); + char pvid_s[ID_LEN + 1] __attribute__((aligned(8))); pvid_s[sizeof(pvid_s) - 1] = '\0'; @@ -1247,7 +1247,7 @@ struct lvmcache_info *lvmcache_add(struct labeller *labeller, const char *pvid, { struct label *label; struct lvmcache_info *existing, *info; - char pvid_s[ID_LEN + 1] __attribute((aligned(8))); + char pvid_s[ID_LEN + 1] __attribute__((aligned(8))); if (!_vgname_hash && !lvmcache_init()) { log_error("Internal cache initialisation failed"); diff --git a/lib/config/config.c b/lib/config/config.c index 115b71ec5..333ff78af 100644 --- a/lib/config/config.c +++ b/lib/config/config.c @@ -159,7 +159,7 @@ static int _parse_config_file(struct parser *p, struct config_tree *cft) return 1; } -struct config_tree *create_config_tree_from_string(struct cmd_context *cmd __attribute((unused)), +struct config_tree *create_config_tree_from_string(struct cmd_context *cmd __attribute__((unused)), const char *config_settings) { struct cs *c; diff --git a/lib/device/dev-io.c b/lib/device/dev-io.c index 1522224de..8c7cf38ce 100644 --- a/lib/device/dev-io.c +++ b/lib/device/dev-io.c @@ -678,7 +678,7 @@ int dev_write(struct device *dev, uint64_t offset, size_t len, void *buffer) int dev_set(struct device *dev, uint64_t offset, size_t len, int value) { size_t s; - char buffer[4096] __attribute((aligned(8))); + char buffer[4096] __attribute__((aligned(8))); if (!dev_open(dev)) return_0; diff --git a/lib/device/dev-md.c b/lib/device/dev-md.c index 64d54fabb..89b93410e 100644 --- a/lib/device/dev-md.c +++ b/lib/device/dev-md.c @@ -320,14 +320,14 @@ unsigned long dev_md_stripe_width(const char *sysfs_dir, struct device *dev) #else -int dev_is_md(struct device *dev __attribute((unused)), - uint64_t *sb __attribute((unused))) +int dev_is_md(struct device *dev __attribute__((unused)), + uint64_t *sb __attribute__((unused))) { return 0; } -unsigned long dev_md_stripe_width(const char *sysfs_dir __attribute((unused)), - struct device *dev __attribute((unused))) +unsigned long dev_md_stripe_width(const char *sysfs_dir __attribute__((unused)), + struct device *dev __attribute__((unused))) { return 0UL; } diff --git a/lib/display/display.c b/lib/display/display.c index 7a8e32526..e5d62f7c9 100644 --- a/lib/display/display.c +++ b/lib/display/display.c @@ -307,7 +307,7 @@ const char *display_size(const struct cmd_context *cmd, uint64_t size) void pvdisplay_colons(const struct physical_volume *pv) { - char uuid[64] __attribute((aligned(8))); + char uuid[64] __attribute__((aligned(8))); if (!pv) return; @@ -358,9 +358,9 @@ void pvdisplay_segments(const struct physical_volume *pv) /* FIXME Include label fields */ void pvdisplay_full(const struct cmd_context *cmd, const struct physical_volume *pv, - void *handle __attribute((unused))) + void *handle __attribute__((unused))) { - char uuid[64] __attribute((aligned(8))); + char uuid[64] __attribute__((aligned(8))); const char *size; uint32_t pe_free; @@ -423,12 +423,12 @@ void pvdisplay_full(const struct cmd_context *cmd, log_print(" "); } -int pvdisplay_short(const struct cmd_context *cmd __attribute((unused)), - const struct volume_group *vg __attribute((unused)), +int pvdisplay_short(const struct cmd_context *cmd __attribute__((unused)), + const struct volume_group *vg __attribute__((unused)), const struct physical_volume *pv, - void *handle __attribute((unused))) + void *handle __attribute__((unused))) { - char uuid[64] __attribute((aligned(8))); + char uuid[64] __attribute__((aligned(8))); if (!pv) return 0; @@ -469,11 +469,11 @@ void lvdisplay_colons(const struct logical_volume *lv) int lvdisplay_full(struct cmd_context *cmd, const struct logical_volume *lv, - void *handle __attribute((unused))) + void *handle __attribute__((unused))) { struct lvinfo info; int inkernel, snap_active = 0; - char uuid[64] __attribute((aligned(8))); + char uuid[64] __attribute__((aligned(8))); struct lv_segment *snap_seg = NULL, *mirror_seg = NULL; float snap_percent; /* fused, fsize; */ percent_range_t percent_range; @@ -646,7 +646,7 @@ int lvdisplay_segments(const struct logical_volume *lv) return 1; } -void vgdisplay_extents(const struct volume_group *vg __attribute((unused))) +void vgdisplay_extents(const struct volume_group *vg __attribute__((unused))) { } @@ -654,7 +654,7 @@ void vgdisplay_full(const struct volume_group *vg) { uint32_t access_str; uint32_t active_pvs; - char uuid[64] __attribute((aligned(8))); + char uuid[64] __attribute__((aligned(8))); active_pvs = vg->pv_count - vg_missing_pv_count(vg); @@ -728,7 +728,7 @@ void vgdisplay_colons(const struct volume_group *vg) { uint32_t active_pvs; const char *access_str; - char uuid[64] __attribute((aligned(8))); + char uuid[64] __attribute__((aligned(8))); active_pvs = vg->pv_count - vg_missing_pv_count(vg); diff --git a/lib/error/errseg.c b/lib/error/errseg.c index fa90a8ed8..6cfcd794b 100644 --- a/lib/error/errseg.c +++ b/lib/error/errseg.c @@ -40,20 +40,20 @@ static int _errseg_merge_segments(struct lv_segment *seg1, struct lv_segment *se } #ifdef DEVMAPPER_SUPPORT -static int _errseg_add_target_line(struct dev_manager *dm __attribute((unused)), - struct dm_pool *mem __attribute((unused)), - struct cmd_context *cmd __attribute((unused)), - void **target_state __attribute((unused)), - struct lv_segment *seg __attribute((unused)), +static int _errseg_add_target_line(struct dev_manager *dm __attribute__((unused)), + struct dm_pool *mem __attribute__((unused)), + struct cmd_context *cmd __attribute__((unused)), + void **target_state __attribute__((unused)), + struct lv_segment *seg __attribute__((unused)), struct dm_tree_node *node, uint64_t len, - uint32_t *pvmove_mirror_count __attribute((unused))) + uint32_t *pvmove_mirror_count __attribute__((unused))) { return dm_tree_node_add_error_target(node, len); } static int _errseg_target_present(struct cmd_context *cmd, - const struct lv_segment *seg __attribute((unused)), - unsigned *attributes __attribute((unused))) + const struct lv_segment *seg __attribute__((unused)), + unsigned *attributes __attribute__((unused))) { static int _errseg_checked = 0; static int _errseg_present = 0; @@ -70,7 +70,7 @@ static int _errseg_target_present(struct cmd_context *cmd, #endif static int _errseg_modules_needed(struct dm_pool *mem, - const struct lv_segment *seg __attribute((unused)), + const struct lv_segment *seg __attribute__((unused)), struct dm_list *modules) { if (!str_list_add(mem, modules, "error")) { diff --git a/lib/filters/filter-md.c b/lib/filters/filter-md.c index c1ecff726..5dc71a9a3 100644 --- a/lib/filters/filter-md.c +++ b/lib/filters/filter-md.c @@ -19,7 +19,7 @@ #ifdef linux -static int _ignore_md(struct dev_filter *f __attribute((unused)), +static int _ignore_md(struct dev_filter *f __attribute__((unused)), struct device *dev) { int ret; diff --git a/lib/filters/filter-sysfs.c b/lib/filters/filter-sysfs.c index 1220b3acc..781e43365 100644 --- a/lib/filters/filter-sysfs.c +++ b/lib/filters/filter-sysfs.c @@ -326,7 +326,7 @@ struct dev_filter *sysfs_filter_create(const char *sysfs_dir) #else -struct dev_filter *sysfs_filter_create(const char *sysfs_dir __attribute((unused))) +struct dev_filter *sysfs_filter_create(const char *sysfs_dir __attribute__((unused))) { return NULL; } diff --git a/lib/filters/filter.c b/lib/filters/filter.c index eafa72608..0cc7e0702 100644 --- a/lib/filters/filter.c +++ b/lib/filters/filter.c @@ -121,7 +121,7 @@ static const device_info_t device_info[] = { {NULL, 0} }; -static int _passes_lvm_type_device_filter(struct dev_filter *f __attribute((unused)), +static int _passes_lvm_type_device_filter(struct dev_filter *f __attribute__((unused)), struct device *dev) { const char *name = dev_name(dev); diff --git a/lib/format1/disk-rep.c b/lib/format1/disk-rep.c index c6439d44a..d38c88746 100644 --- a/lib/format1/disk-rep.c +++ b/lib/format1/disk-rep.c @@ -247,7 +247,7 @@ static int _read_uuids(struct disk_list *data) { unsigned num_read = 0; struct uuid_list *ul; - char buffer[NAME_LEN] __attribute((aligned(8))); + char buffer[NAME_LEN] __attribute__((aligned(8))); uint64_t pos = data->pvd.pv_uuidlist_on_disk.base; uint64_t end = pos + data->pvd.pv_uuidlist_on_disk.size; @@ -650,7 +650,7 @@ static int _write_pvd(struct disk_list *data) /* * assumes the device has been opened. */ -static int __write_all_pvd(const struct format_type *fmt __attribute((unused)), +static int __write_all_pvd(const struct format_type *fmt __attribute__((unused)), struct disk_list *data) { const char *pv_name = dev_name(data->dev); diff --git a/lib/format1/disk-rep.h b/lib/format1/disk-rep.h index b91be39d3..0d54438a9 100644 --- a/lib/format1/disk-rep.h +++ b/lib/format1/disk-rep.h @@ -148,7 +148,7 @@ struct pe_disk { struct uuid_list { struct dm_list list; - char uuid[NAME_LEN] __attribute((aligned(8))); + char uuid[NAME_LEN] __attribute__((aligned(8))); }; struct lvd_list { @@ -161,11 +161,11 @@ struct disk_list { struct dm_pool *mem; struct device *dev; - struct pv_disk pvd __attribute((aligned(8))); - struct vg_disk vgd __attribute((aligned(8))); - struct dm_list uuids __attribute((aligned(8))); - struct dm_list lvds __attribute((aligned(8))); - struct pe_disk *extents __attribute((aligned(8))); + struct pv_disk pvd __attribute__((aligned(8))); + struct vg_disk vgd __attribute__((aligned(8))); + struct dm_list uuids __attribute__((aligned(8))); + struct dm_list lvds __attribute__((aligned(8))); + struct pe_disk *extents __attribute__((aligned(8))); }; /* diff --git a/lib/format1/format1.c b/lib/format1/format1.c index 7c52d2b05..a354bb5d7 100644 --- a/lib/format1/format1.c +++ b/lib/format1/format1.c @@ -163,7 +163,7 @@ static struct volume_group *_build_vg(struct format_instance *fid, static struct volume_group *_format1_vg_read(struct format_instance *fid, const char *vg_name, - struct metadata_area *mda __attribute((unused))) + struct metadata_area *mda __attribute__((unused))) { struct dm_pool *mem = dm_pool_create("lvm1 vg_read", VG_MEMPOOL_CHUNK); struct dm_list pvs; @@ -241,7 +241,7 @@ static int _flatten_vg(struct format_instance *fid, struct dm_pool *mem, } static int _format1_vg_write(struct format_instance *fid, struct volume_group *vg, - struct metadata_area *mda __attribute((unused))) + struct metadata_area *mda __attribute__((unused))) { struct dm_pool *mem = dm_pool_create("lvm1 vg_write", VG_MEMPOOL_CHUNK); struct dm_list pvds; @@ -262,8 +262,8 @@ static int _format1_vg_write(struct format_instance *fid, struct volume_group *v } static int _format1_pv_read(const struct format_type *fmt, const char *pv_name, - struct physical_volume *pv, struct dm_list *mdas __attribute((unused)), - int scan_label_only __attribute((unused))) + struct physical_volume *pv, struct dm_list *mdas __attribute__((unused)), + int scan_label_only __attribute__((unused))) { struct dm_pool *mem = dm_pool_create("lvm1 pv_read", 1024); struct disk_list *dl; @@ -296,13 +296,13 @@ static int _format1_pv_read(const struct format_type *fmt, const char *pv_name, static int _format1_pv_setup(const struct format_type *fmt, uint64_t pe_start, uint32_t extent_count, uint32_t extent_size, - unsigned long data_alignment __attribute((unused)), - unsigned long data_alignment_offset __attribute((unused)), - int pvmetadatacopies __attribute((unused)), - uint64_t pvmetadatasize __attribute((unused)), - unsigned metadataignore __attribute((unused)), - struct dm_list *mdas __attribute((unused)), - struct physical_volume *pv, struct volume_group *vg __attribute((unused))) + unsigned long data_alignment __attribute__((unused)), + unsigned long data_alignment_offset __attribute__((unused)), + int pvmetadatacopies __attribute__((unused)), + uint64_t pvmetadatasize __attribute__((unused)), + unsigned metadataignore __attribute__((unused)), + struct dm_list *mdas __attribute__((unused)), + struct physical_volume *pv, struct volume_group *vg __attribute__((unused))) { if (pv->size > MAX_PV_SIZE) pv->size--; @@ -354,7 +354,7 @@ static int _format1_lv_setup(struct format_instance *fid, struct logical_volume } static int _format1_pv_write(const struct format_type *fmt, struct physical_volume *pv, - struct dm_list *mdas __attribute((unused)), int64_t sector __attribute((unused))) + struct dm_list *mdas __attribute__((unused)), int64_t sector __attribute__((unused))) { struct dm_pool *mem; struct disk_list *dl; @@ -439,7 +439,7 @@ static int _format1_vg_setup(struct format_instance *fid, struct volume_group *v return 1; } -static int _format1_segtype_supported(struct format_instance *fid __attribute((unused)), +static int _format1_segtype_supported(struct format_instance *fid __attribute__((unused)), const struct segment_type *segtype) { if (!(segtype->flags & SEG_FORMAT1_SUPPORT)) @@ -454,9 +454,9 @@ static struct metadata_area_ops _metadata_format1_ops = { }; static struct format_instance *_format1_create_instance(const struct format_type *fmt, - const char *vgname __attribute((unused)), - const char *vgid __attribute((unused)), - void *private __attribute((unused))) + const char *vgname __attribute__((unused)), + const char *vgid __attribute__((unused)), + void *private __attribute__((unused))) { struct format_instance *fid; struct metadata_area *mda; @@ -482,7 +482,7 @@ static struct format_instance *_format1_create_instance(const struct format_type return fid; } -static void _format1_destroy_instance(struct format_instance *fid __attribute((unused))) +static void _format1_destroy_instance(struct format_instance *fid __attribute__((unused))) { } diff --git a/lib/format1/import-export.c b/lib/format1/import-export.c index e37d59e73..864034bb9 100644 --- a/lib/format1/import-export.c +++ b/lib/format1/import-export.c @@ -137,7 +137,7 @@ static int _system_id(struct cmd_context *cmd, char *s, const char *prefix) return 1; } -int export_pv(struct cmd_context *cmd, struct dm_pool *mem __attribute((unused)), +int export_pv(struct cmd_context *cmd, struct dm_pool *mem __attribute__((unused)), struct volume_group *vg, struct pv_disk *pvd, struct physical_volume *pv) { @@ -552,7 +552,7 @@ int export_lvs(struct disk_list *dl, struct volume_group *vg, /* * FIXME: More inefficient code. */ -int import_snapshots(struct dm_pool *mem __attribute((unused)), struct volume_group *vg, +int import_snapshots(struct dm_pool *mem __attribute__((unused)), struct volume_group *vg, struct dm_list *pvds) { struct logical_volume *lvs[MAX_LV]; @@ -641,7 +641,7 @@ int export_uuids(struct disk_list *dl, struct volume_group *vg) * This calculates the nasty pv_number field * used by LVM1. */ -void export_numbers(struct dm_list *pvds, struct volume_group *vg __attribute((unused))) +void export_numbers(struct dm_list *pvds, struct volume_group *vg __attribute__((unused))) { struct disk_list *dl; int pv_num = 1; diff --git a/lib/format1/lvm1-label.c b/lib/format1/lvm1-label.c index bf25ce00c..07596a54a 100644 --- a/lib/format1/lvm1-label.c +++ b/lib/format1/lvm1-label.c @@ -30,7 +30,7 @@ static void _not_supported(const char *op) op); } -static int _lvm1_can_handle(struct labeller *l __attribute((unused)), void *buf, uint64_t sector) +static int _lvm1_can_handle(struct labeller *l __attribute__((unused)), void *buf, uint64_t sector) { struct pv_disk *pvd = (struct pv_disk *) buf; uint32_t version; @@ -48,7 +48,7 @@ static int _lvm1_can_handle(struct labeller *l __attribute((unused)), void *buf, return 0; } -static int _lvm1_write(struct label *label __attribute((unused)), void *buf __attribute((unused))) +static int _lvm1_write(struct label *label __attribute__((unused)), void *buf __attribute__((unused))) { _not_supported("write"); return 0; @@ -87,14 +87,14 @@ static int _lvm1_read(struct labeller *l, struct device *dev, void *buf, return 1; } -static int _lvm1_initialise_label(struct labeller *l __attribute((unused)), struct label *label) +static int _lvm1_initialise_label(struct labeller *l __attribute__((unused)), struct label *label) { strcpy(label->type, "LVM1"); return 1; } -static void _lvm1_destroy_label(struct labeller *l __attribute((unused)), struct label *label __attribute((unused))) +static void _lvm1_destroy_label(struct labeller *l __attribute__((unused)), struct label *label __attribute__((unused))) { } diff --git a/lib/format_pool/disk_rep.c b/lib/format_pool/disk_rep.c index adbae6d4e..2c16f50ea 100644 --- a/lib/format_pool/disk_rep.c +++ b/lib/format_pool/disk_rep.c @@ -34,10 +34,10 @@ #define CPOUT_64(x, y) {(y) = xlate64_be((x));} static int __read_pool_disk(const struct format_type *fmt, struct device *dev, - struct dm_pool *mem __attribute((unused)), struct pool_list *pl, - const char *vg_name __attribute((unused))) + struct dm_pool *mem __attribute__((unused)), struct pool_list *pl, + const char *vg_name __attribute__((unused))) { - char buf[512] __attribute((aligned(8))); + char buf[512] __attribute__((aligned(8))); /* FIXME: Need to check the cache here first */ if (!dev_read(dev, UINT64_C(0), 512, buf)) { @@ -58,7 +58,7 @@ static void _add_pl_to_list(struct dm_list *head, struct pool_list *data) dm_list_iterate_items(pl, head) { if (id_equal(&data->pv_uuid, &pl->pv_uuid)) { - char uuid[ID_LEN + 7] __attribute((aligned(8))); + char uuid[ID_LEN + 7] __attribute__((aligned(8))); id_write_format(&pl->pv_uuid, uuid, ID_LEN + 7); @@ -84,7 +84,7 @@ int read_pool_label(struct pool_list *pl, struct labeller *l, struct lvmcache_info *info; struct id pvid; struct id vgid; - char uuid[ID_LEN + 7] __attribute((aligned(8))); + char uuid[ID_LEN + 7] __attribute__((aligned(8))); struct pool_disk *pd = &pl->pd; pool_label_in(pd, buf); diff --git a/lib/format_pool/format_pool.c b/lib/format_pool/format_pool.c index a0eb8278e..56626f5bf 100644 --- a/lib/format_pool/format_pool.c +++ b/lib/format_pool/format_pool.c @@ -158,7 +158,7 @@ static struct volume_group *_build_vg_from_pds(struct format_instance static struct volume_group *_pool_vg_read(struct format_instance *fid, const char *vg_name, - struct metadata_area *mda __attribute((unused))) + struct metadata_area *mda __attribute__((unused))) { struct dm_pool *mem = dm_pool_create("pool vg_read", VG_MEMPOOL_CHUNK); struct dm_list pds; @@ -188,26 +188,26 @@ out: return NULL; } -static int _pool_pv_setup(const struct format_type *fmt __attribute((unused)), - uint64_t pe_start __attribute((unused)), - uint32_t extent_count __attribute((unused)), - uint32_t extent_size __attribute((unused)), - unsigned long data_alignment __attribute((unused)), - unsigned long data_alignment_offset __attribute((unused)), - int pvmetadatacopies __attribute((unused)), - uint64_t pvmetadatasize __attribute((unused)), - unsigned metadataignore __attribute((unused)), - struct dm_list *mdas __attribute((unused)), - struct physical_volume *pv __attribute((unused)), - struct volume_group *vg __attribute((unused))) +static int _pool_pv_setup(const struct format_type *fmt __attribute__((unused)), + uint64_t pe_start __attribute__((unused)), + uint32_t extent_count __attribute__((unused)), + uint32_t extent_size __attribute__((unused)), + unsigned long data_alignment __attribute__((unused)), + unsigned long data_alignment_offset __attribute__((unused)), + int pvmetadatacopies __attribute__((unused)), + uint64_t pvmetadatasize __attribute__((unused)), + unsigned metadataignore __attribute__((unused)), + struct dm_list *mdas __attribute__((unused)), + struct physical_volume *pv __attribute__((unused)), + struct volume_group *vg __attribute__((unused))) { return 1; } static int _pool_pv_read(const struct format_type *fmt, const char *pv_name, struct physical_volume *pv, - struct dm_list *mdas __attribute((unused)), - int scan_label_only __attribute((unused))) + struct dm_list *mdas __attribute__((unused)), + int scan_label_only __attribute__((unused))) { struct dm_pool *mem = dm_pool_create("pool pv_read", 1024); struct pool_list *pl; @@ -249,9 +249,9 @@ static struct metadata_area_ops _metadata_format_pool_ops = { /* *INDENT-ON* */ static struct format_instance *_pool_create_instance(const struct format_type *fmt, - const char *vgname __attribute((unused)), - const char *vgid __attribute((unused)), - void *private __attribute((unused))) + const char *vgname __attribute__((unused)), + const char *vgid __attribute__((unused)), + void *private __attribute__((unused))) { struct format_instance *fid; struct metadata_area *mda; @@ -282,7 +282,7 @@ static struct format_instance *_pool_create_instance(const struct format_type *f return fid; } -static void _pool_destroy_instance(struct format_instance *fid __attribute((unused))) +static void _pool_destroy_instance(struct format_instance *fid __attribute__((unused))) { } diff --git a/lib/format_pool/pool_label.c b/lib/format_pool/pool_label.c index 7b4cfacd1..2d34e6085 100644 --- a/lib/format_pool/pool_label.c +++ b/lib/format_pool/pool_label.c @@ -29,7 +29,7 @@ static void _pool_not_supported(const char *op) op); } -static int _pool_can_handle(struct labeller *l __attribute((unused)), void *buf, uint64_t sector) +static int _pool_can_handle(struct labeller *l __attribute__((unused)), void *buf, uint64_t sector) { struct pool_disk pd; @@ -50,7 +50,7 @@ static int _pool_can_handle(struct labeller *l __attribute((unused)), void *buf, return 0; } -static int _pool_write(struct label *label __attribute((unused)), void *buf __attribute((unused))) +static int _pool_write(struct label *label __attribute__((unused)), void *buf __attribute__((unused))) { _pool_not_supported("write"); return 0; @@ -64,14 +64,14 @@ static int _pool_read(struct labeller *l, struct device *dev, void *buf, return read_pool_label(&pl, l, dev, buf, label); } -static int _pool_initialise_label(struct labeller *l __attribute((unused)), struct label *label) +static int _pool_initialise_label(struct labeller *l __attribute__((unused)), struct label *label) { strcpy(label->type, "POOL"); return 1; } -static void _pool_destroy_label(struct labeller *l __attribute((unused)), struct label *label __attribute((unused))) +static void _pool_destroy_label(struct labeller *l __attribute__((unused)), struct label *label __attribute__((unused))) { } diff --git a/lib/format_text/export.c b/lib/format_text/export.c index 52ae11c22..bb558fce2 100644 --- a/lib/format_text/export.c +++ b/lib/format_text/export.c @@ -183,7 +183,7 @@ static int _out_with_comment_file(struct formatter *f, const char *comment, } static int _out_with_comment_raw(struct formatter *f, - const char *comment __attribute((unused)), + const char *comment __attribute__((unused)), const char *fmt, va_list ap) { int n; @@ -413,7 +413,7 @@ static const char *_get_pv_name_from_uuid(struct formatter *f, char *uuid) static const char *_get_pv_name(struct formatter *f, struct physical_volume *pv) { - char uuid[64] __attribute((aligned(8))); + char uuid[64] __attribute__((aligned(8))); if (!pv || !id_write_format(&pv->id, uuid, sizeof(uuid))) return_NULL; diff --git a/lib/format_text/format-text.c b/lib/format_text/format-text.c index 7ff5f8582..bd776b72c 100644 --- a/lib/format_text/format-text.c +++ b/lib/format_text/format-text.c @@ -80,7 +80,7 @@ void rlocn_set_ignored(struct raw_locn *rlocn, unsigned mda_ignored) * NOTE: Currently there can be only one vg per text file. */ -static int _text_vg_setup(struct format_instance *fid __attribute((unused)), +static int _text_vg_setup(struct format_instance *fid __attribute__((unused)), struct volume_group *vg) { if (vg->extent_size & (vg->extent_size - 1)) { @@ -108,7 +108,7 @@ static uint64_t _mda_total_sectors_raw(struct metadata_area *mda) /* * Check if metadata area belongs to vg */ -static int _mda_in_vg_raw(struct format_instance *fid __attribute((unused)), +static int _mda_in_vg_raw(struct format_instance *fid __attribute__((unused)), struct volume_group *vg, struct metadata_area *mda) { struct mda_context *mdac = (struct mda_context *) mda->metadata_locn; @@ -279,7 +279,7 @@ static int _pv_analyze_mda_raw (const struct format_type * fmt, -static int _text_lv_setup(struct format_instance *fid __attribute((unused)), +static int _text_lv_setup(struct format_instance *fid __attribute__((unused)), struct logical_volume *lv) { /******** FIXME Any LV size restriction? @@ -396,7 +396,7 @@ static struct raw_locn *_find_vg_rlocn(struct device_area *dev_area, int *precommitted) { size_t len; - char vgnamebuf[NAME_LEN + 2] __attribute((aligned(8))); + char vgnamebuf[NAME_LEN + 2] __attribute__((aligned(8))); struct raw_locn *rlocn, *rlocn_precommitted; struct lvmcache_info *info; @@ -892,7 +892,7 @@ static struct volume_group *_vg_read_precommit_file(struct format_instance *fid, return vg; } -static int _vg_write_file(struct format_instance *fid __attribute((unused)), +static int _vg_write_file(struct format_instance *fid __attribute__((unused)), struct volume_group *vg, struct metadata_area *mda) { struct text_context *tc = (struct text_context *) mda->metadata_locn; @@ -958,7 +958,7 @@ static int _vg_write_file(struct format_instance *fid __attribute((unused)), return 1; } -static int _vg_commit_file_backup(struct format_instance *fid __attribute((unused)), +static int _vg_commit_file_backup(struct format_instance *fid __attribute__((unused)), struct volume_group *vg, struct metadata_area *mda) { @@ -1025,8 +1025,8 @@ static int _vg_commit_file(struct format_instance *fid, struct volume_group *vg, return 1; } -static int _vg_remove_file(struct format_instance *fid __attribute((unused)), - struct volume_group *vg __attribute((unused)), +static int _vg_remove_file(struct format_instance *fid __attribute__((unused)), + struct volume_group *vg __attribute__((unused)), struct metadata_area *mda) { struct text_context *tc = (struct text_context *) mda->metadata_locn; @@ -1105,8 +1105,8 @@ const char *vgname_from_mda(const struct format_type *fmt, uint32_t wrap = 0; const char *vgname = NULL; unsigned int len = 0; - char buf[NAME_LEN + 1] __attribute((aligned(8))); - char uuid[64] __attribute((aligned(8))); + char buf[NAME_LEN + 1] __attribute__((aligned(8))); + char uuid[64] __attribute__((aligned(8))); uint64_t buffer_size, current_usage; if (mda_free_sectors) @@ -1251,7 +1251,7 @@ static int _mda_setup(const struct format_type *fmt, int pvmetadatacopies, uint64_t pvmetadatasize, unsigned metadataignore, struct dm_list *mdas, struct physical_volume *pv, - struct volume_group *vg __attribute((unused))) + struct volume_group *vg __attribute__((unused))) { uint64_t mda_adjustment, disk_size, alignment, alignment_offset; uint64_t start1, mda_size1; /* First area - start of disk */ @@ -1407,7 +1407,7 @@ static int _text_pv_write(const struct format_type *fmt, struct physical_volume struct lvmcache_info *info; struct mda_context *mdac; struct metadata_area *mda; - char buf[MDA_HEADER_SIZE] __attribute((aligned(8))); + char buf[MDA_HEADER_SIZE] __attribute__((aligned(8))); struct mda_header *mdah = (struct mda_header *) buf; uint64_t adjustment; struct data_area_list *da; @@ -1689,7 +1689,7 @@ static int _text_pv_read(const struct format_type *fmt, const char *pv_name, return 1; } -static void _text_destroy_instance(struct format_instance *fid __attribute((unused))) +static void _text_destroy_instance(struct format_instance *fid __attribute__((unused))) { } @@ -2106,7 +2106,7 @@ static int _get_config_disk_area(struct cmd_context *cmd, } if (!(dev_area.dev = device_from_pvid(cmd, &id, NULL))) { - char buffer[64] __attribute((aligned(8))); + char buffer[64] __attribute__((aligned(8))); if (!id_write_format(&id, buffer, sizeof(buffer))) log_error("Couldn't find device."); diff --git a/lib/format_text/import_vsn1.c b/lib/format_text/import_vsn1.c index 62bcbec18..d59fb1684 100644 --- a/lib/format_text/import_vsn1.c +++ b/lib/format_text/import_vsn1.c @@ -156,9 +156,9 @@ static int _read_flag_config(struct config_node *n, uint64_t *status, int type) static int _read_pv(struct format_instance *fid, struct dm_pool *mem, struct volume_group *vg, struct config_node *pvn, - struct config_node *vgn __attribute((unused)), + struct config_node *vgn __attribute__((unused)), struct dm_hash_table *pv_hash, - struct dm_hash_table *lv_hash __attribute((unused)), + struct dm_hash_table *lv_hash __attribute__((unused)), unsigned *scan_done_once, unsigned report_missing_devices) { @@ -194,7 +194,7 @@ static int _read_pv(struct format_instance *fid, struct dm_pool *mem, * Convert the uuid into a device. */ if (!(pv->dev = device_from_pvid(fid->fmt->cmd, &pv->id, scan_done_once))) { - char buffer[64] __attribute((aligned(8))); + char buffer[64] __attribute__((aligned(8))); if (!id_write_format(&pv->id, buffer, sizeof(buffer))) buffer[0] = '\0'; @@ -491,14 +491,14 @@ static int _read_segments(struct dm_pool *mem, struct volume_group *vg, return 1; } -static int _read_lvnames(struct format_instance *fid __attribute((unused)), +static int _read_lvnames(struct format_instance *fid __attribute__((unused)), struct dm_pool *mem, struct volume_group *vg, struct config_node *lvn, - struct config_node *vgn __attribute((unused)), - struct dm_hash_table *pv_hash __attribute((unused)), + struct config_node *vgn __attribute__((unused)), + struct dm_hash_table *pv_hash __attribute__((unused)), struct dm_hash_table *lv_hash, - unsigned *scan_done_once __attribute((unused)), - unsigned report_missing_devices __attribute((unused))) + unsigned *scan_done_once __attribute__((unused)), + unsigned report_missing_devices __attribute__((unused))) { struct logical_volume *lv; struct config_node *cn; @@ -563,14 +563,14 @@ static int _read_lvnames(struct format_instance *fid __attribute((unused)), return link_lv_to_vg(vg, lv); } -static int _read_lvsegs(struct format_instance *fid __attribute((unused)), +static int _read_lvsegs(struct format_instance *fid __attribute__((unused)), struct dm_pool *mem, struct volume_group *vg, struct config_node *lvn, - struct config_node *vgn __attribute((unused)), + struct config_node *vgn __attribute__((unused)), struct dm_hash_table *pv_hash, struct dm_hash_table *lv_hash, - unsigned *scan_done_once __attribute((unused)), - unsigned report_missing_devices __attribute((unused))) + unsigned *scan_done_once __attribute__((unused)), + unsigned report_missing_devices __attribute__((unused))) { struct logical_volume *lv; diff --git a/lib/format_text/text_label.c b/lib/format_text/text_label.c index d19662aea..6323705cf 100644 --- a/lib/format_text/text_label.c +++ b/lib/format_text/text_label.c @@ -23,9 +23,9 @@ #include #include -static int _text_can_handle(struct labeller *l __attribute((unused)), +static int _text_can_handle(struct labeller *l __attribute__((unused)), void *buf, - uint64_t sector __attribute((unused))) + uint64_t sector __attribute__((unused))) { struct label_header *lh = (struct label_header *) buf; @@ -44,7 +44,7 @@ static int _text_write(struct label *label, void *buf) struct metadata_area *mda; struct mda_context *mdac; struct data_area_list *da; - char buffer[64] __attribute((aligned(8))); + char buffer[64] __attribute__((aligned(8))); int da1, mda1, mda2; /* FIXME Move to where label is created */ @@ -242,7 +242,7 @@ void del_mdas(struct dm_list *mdas) } } -static int _text_initialise_label(struct labeller *l __attribute((unused)), +static int _text_initialise_label(struct labeller *l __attribute__((unused)), struct label *label) { strncpy(label->type, LVM2_LABEL, sizeof(label->type)); @@ -343,7 +343,7 @@ static int _text_read(struct labeller *l, struct device *dev, void *buf, return 1; } -static void _text_destroy_label(struct labeller *l __attribute((unused)), +static void _text_destroy_label(struct labeller *l __attribute__((unused)), struct label *label) { struct lvmcache_info *info = (struct lvmcache_info *) label->info; diff --git a/lib/label/label.c b/lib/label/label.c index 4823c80c1..9fa505416 100644 --- a/lib/label/label.c +++ b/lib/label/label.c @@ -114,7 +114,7 @@ static struct labeller *_find_labeller(struct device *dev, char *buf, struct lvmcache_info *info; uint64_t sector; int found = 0; - char readbuf[LABEL_SCAN_SIZE] __attribute((aligned(8))); + char readbuf[LABEL_SCAN_SIZE] __attribute__((aligned(8))); if (!dev_read(dev, scan_sector << SECTOR_SHIFT, LABEL_SCAN_SIZE, readbuf)) { @@ -190,8 +190,8 @@ static struct labeller *_find_labeller(struct device *dev, char *buf, /* FIXME Also wipe associated metadata area headers? */ int label_remove(struct device *dev) { - char buf[LABEL_SIZE] __attribute((aligned(8))); - char readbuf[LABEL_SCAN_SIZE] __attribute((aligned(8))); + char buf[LABEL_SIZE] __attribute__((aligned(8))); + char readbuf[LABEL_SCAN_SIZE] __attribute__((aligned(8))); int r = 1; uint64_t sector; int wipe; @@ -260,7 +260,7 @@ int label_remove(struct device *dev) int label_read(struct device *dev, struct label **result, uint64_t scan_sector) { - char buf[LABEL_SIZE] __attribute((aligned(8))); + char buf[LABEL_SIZE] __attribute__((aligned(8))); struct labeller *l; uint64_t sector; struct lvmcache_info *info; @@ -299,7 +299,7 @@ int label_read(struct device *dev, struct label **result, /* Caller may need to use label_get_handler to create label struct! */ int label_write(struct device *dev, struct label *label) { - char buf[LABEL_SIZE] __attribute((aligned(8))); + char buf[LABEL_SIZE] __attribute__((aligned(8))); struct label_header *lh = (struct label_header *) buf; int r = 1; @@ -347,7 +347,7 @@ int label_write(struct device *dev, struct label *label) int label_verify(struct device *dev) { struct labeller *l; - char buf[LABEL_SIZE] __attribute((aligned(8))); + char buf[LABEL_SIZE] __attribute__((aligned(8))); uint64_t sector; struct lvmcache_info *info; int r = 0; diff --git a/lib/locking/cluster_locking.c b/lib/locking/cluster_locking.c index 1a0dbfdc8..b975d2731 100644 --- a/lib/locking/cluster_locking.c +++ b/lib/locking/cluster_locking.c @@ -97,7 +97,7 @@ static int _open_local_sock(void) /* Send a request and return the status */ static int _send_request(char *inbuf, int inlen, char **retbuf) { - char outbuf[PIPE_BUF] __attribute((aligned(8))); + char outbuf[PIPE_BUF] __attribute__((aligned(8))); struct clvm_header *outheader = (struct clvm_header *) outbuf; int len; int off; @@ -199,7 +199,7 @@ static void _build_header(struct clvm_header *head, int clvmd_cmd, const char *n static int _cluster_request(char clvmd_cmd, const char *node, void *data, int len, lvm_response_t ** response, int *num) { - char outbuf[sizeof(struct clvm_header) + len + strlen(node) + 1] __attribute((aligned(8))); + char outbuf[sizeof(struct clvm_header) + len + strlen(node) + 1] __attribute__((aligned(8))); char *inptr; char *retbuf = NULL; int status; diff --git a/lib/locking/file_locking.c b/lib/locking/file_locking.c index 46232cc19..627cb6853 100644 --- a/lib/locking/file_locking.c +++ b/lib/locking/file_locking.c @@ -112,7 +112,7 @@ static void _remove_ctrl_c_handler(void) log_sys_error("signal", "_remove_ctrl_c_handler"); } -static void _trap_ctrl_c(int sig __attribute((unused))) +static void _trap_ctrl_c(int sig __attribute__((unused))) { _remove_ctrl_c_handler(); log_error("CTRL-c detected: giving up waiting for lock"); diff --git a/lib/locking/locking.c b/lib/locking/locking.c index ab391af65..e64d227fa 100644 --- a/lib/locking/locking.c +++ b/lib/locking/locking.c @@ -127,7 +127,7 @@ void sigint_restore(void) sigaction(SIGINT, &_oldhandler, NULL); } -static void _block_signals(uint32_t flags __attribute((unused))) +static void _block_signals(uint32_t flags __attribute__((unused))) { sigset_t set; @@ -396,7 +396,7 @@ static int _lock_vol(struct cmd_context *cmd, const char *resource, int lock_vol(struct cmd_context *cmd, const char *vol, uint32_t flags) { - char resource[258] __attribute((aligned(8))); + char resource[258] __attribute__((aligned(8))); lv_operation_t lv_op; switch (flags & (LCK_SCOPE_MASK | LCK_TYPE_MASK)) { diff --git a/lib/locking/no_locking.c b/lib/locking/no_locking.c index 9de143b37..9fbbac0cc 100644 --- a/lib/locking/no_locking.c +++ b/lib/locking/no_locking.c @@ -79,7 +79,7 @@ static int _readonly_lock_resource(struct cmd_context *cmd, return _no_lock_resource(cmd, resource, flags); } -int init_no_locking(struct locking_type *locking, struct cmd_context *cmd __attribute((unused))) +int init_no_locking(struct locking_type *locking, struct cmd_context *cmd __attribute__((unused))) { locking->lock_resource = _no_lock_resource; locking->reset_locking = _no_reset_locking; @@ -89,7 +89,7 @@ int init_no_locking(struct locking_type *locking, struct cmd_context *cmd __attr return 1; } -int init_readonly_locking(struct locking_type *locking, struct cmd_context *cmd __attribute((unused))) +int init_readonly_locking(struct locking_type *locking, struct cmd_context *cmd __attribute__((unused))) { locking->lock_resource = _readonly_lock_resource; locking->reset_locking = _no_reset_locking; diff --git a/lib/metadata/lv_manip.c b/lib/metadata/lv_manip.c index 5e4a6741b..52c80c4c3 100644 --- a/lib/metadata/lv_manip.c +++ b/lib/metadata/lv_manip.c @@ -951,7 +951,7 @@ static int _is_contiguous(struct pv_segment *pvseg, struct pv_area *pva) return 1; } -static int _is_condition(struct cmd_context *cmd __attribute((unused)), +static int _is_condition(struct cmd_context *cmd __attribute__((unused)), struct pv_segment *pvseg, uint32_t s, void *data) { @@ -1743,8 +1743,8 @@ int lv_extend(struct logical_volume *lv, const struct segment_type *segtype, uint32_t stripes, uint32_t stripe_size, uint32_t mirrors, uint32_t extents, - struct physical_volume *mirrored_pv __attribute((unused)), - uint32_t mirrored_pe __attribute((unused)), + struct physical_volume *mirrored_pv __attribute__((unused)), + uint32_t mirrored_pe __attribute__((unused)), uint64_t status, struct dm_list *allocatable_pvs, alloc_policy_t alloc) { @@ -2072,7 +2072,7 @@ bad: } static int _add_pvs(struct cmd_context *cmd, struct pv_segment *peg, - uint32_t s __attribute((unused)), void *data) + uint32_t s __attribute__((unused)), void *data) { struct seg_pvs *spvs = (struct seg_pvs *) data; struct pv_list *pvl; diff --git a/lib/metadata/metadata.c b/lib/metadata/metadata.c index b09580970..cded84985 100644 --- a/lib/metadata/metadata.c +++ b/lib/metadata/metadata.c @@ -172,7 +172,7 @@ int add_pv_to_vg(struct volume_group *vg, const char *pv_name, struct pv_list *pvl; struct format_instance *fid = vg->fid; struct dm_pool *mem = vg->vgmem; - char uuid[64] __attribute((aligned(8))); + char uuid[64] __attribute__((aligned(8))); struct dm_list *mdas; log_verbose("Adding physical volume '%s' to volume group '%s'", @@ -1491,7 +1491,7 @@ static int _move_mdas(struct volume_group *vg_from, struct volume_group *vg_to, * Separate metadata areas after splitting a VG. * Also accepts orphan VG as destination (for vgreduce). */ -int vg_split_mdas(struct cmd_context *cmd __attribute((unused)), +int vg_split_mdas(struct cmd_context *cmd __attribute__((unused)), struct volume_group *vg_from, struct volume_group *vg_to) { struct dm_list *mdas_from_in_use, *mdas_to_in_use; @@ -1683,7 +1683,7 @@ struct physical_volume * pvcreate_single(struct cmd_context *cmd, struct device *dev; struct dm_list mdas; struct pvcreate_params default_pp; - char buffer[64] __attribute((aligned(8))); + char buffer[64] __attribute__((aligned(8))); pvcreate_params_set_defaults(&default_pp); if (!pp) @@ -2122,7 +2122,7 @@ unsigned vg_visible_lvs(const struct volume_group *vg) /* * Determine whether two vgs are compatible for merging. */ -int vgs_are_compatible(struct cmd_context *cmd __attribute((unused)), +int vgs_are_compatible(struct cmd_context *cmd __attribute__((unused)), struct volume_group *vg_from, struct volume_group *vg_to) { @@ -2411,7 +2411,7 @@ int vg_validate(struct volume_group *vg) { struct pv_list *pvl, *pvl2; struct lv_list *lvl, *lvl2; - char uuid[64] __attribute((aligned(8))); + char uuid[64] __attribute__((aligned(8))); int r = 1; uint32_t hidden_lv_count = 0, lv_count = 0, lv_visible_count = 0; uint32_t pv_count = 0; @@ -2900,7 +2900,7 @@ static struct volume_group *_vg_read(struct cmd_context *cmd, struct dm_list *pvids; struct pv_list *pvl, *pvl2; struct dm_list all_pvs; - char uuid[64] __attribute((aligned(8))); + char uuid[64] __attribute__((aligned(8))); if (is_orphan_vg(vgname)) { if (use_precommitted) { @@ -3638,7 +3638,7 @@ int scan_vgs_for_pvs(struct cmd_context *cmd) return _get_pvs(cmd, NULL); } -int pv_write(struct cmd_context *cmd __attribute((unused)), +int pv_write(struct cmd_context *cmd __attribute__((unused)), struct physical_volume *pv, struct dm_list *mdas, int64_t label_sector) { diff --git a/lib/metadata/mirror.c b/lib/metadata/mirror.c index d84b0766e..b15985693 100644 --- a/lib/metadata/mirror.c +++ b/lib/metadata/mirror.c @@ -1064,8 +1064,8 @@ int remove_mirror_images(struct logical_volume *lv, uint32_t num_mirrors, return 1; } -static int _no_removable_images(struct logical_volume *lv __attribute((unused)), - void *baton __attribute((unused))) { +static int _no_removable_images(struct logical_volume *lv __attribute__((unused)), + void *baton __attribute__((unused))) { return 0; } @@ -1110,7 +1110,7 @@ int collapse_mirrored_lv(struct logical_volume *lv) return 1; } -static int get_mirror_fault_policy(struct cmd_context *cmd __attribute((unused)), +static int get_mirror_fault_policy(struct cmd_context *cmd __attribute__((unused)), int log_policy) { const char *policy; @@ -1432,7 +1432,7 @@ struct logical_volume *find_pvmove_lv(struct volume_group *vg, struct logical_volume *find_pvmove_lv_from_pvname(struct cmd_context *cmd, struct volume_group *vg, const char *name, - const char *uuid __attribute((unused)), + const char *uuid __attribute__((unused)), uint32_t lv_type) { struct physical_volume *pv; @@ -2000,7 +2000,7 @@ int lv_split_mirror_images(struct logical_volume *lv, const char *split_name, * 'mirror' is the number of mirrors to be removed. * 'pvs' is removable pvs. */ -int lv_remove_mirrors(struct cmd_context *cmd __attribute((unused)), +int lv_remove_mirrors(struct cmd_context *cmd __attribute__((unused)), struct logical_volume *lv, uint32_t mirrors, uint32_t log_count, int (*is_removable)(struct logical_volume *, void *), diff --git a/lib/mirror/mirrored.c b/lib/mirror/mirrored.c index eca037763..1d11b7513 100644 --- a/lib/mirror/mirrored.c +++ b/lib/mirror/mirrored.c @@ -610,7 +610,7 @@ static int _target_monitored(struct lv_segment *seg, int *pending) /* FIXME This gets run while suspended and performs banned operations. */ static int _target_set_events(struct lv_segment *seg, - int evmask __attribute((unused)), int set) + int evmask __attribute__((unused)), int set) { char *dso, *uuid; struct logical_volume *lv; diff --git a/lib/replicator/replicator.c b/lib/replicator/replicator.c index 6f09321aa..2c58d1688 100644 --- a/lib/replicator/replicator.c +++ b/lib/replicator/replicator.c @@ -221,7 +221,7 @@ static int _add_site(struct lv_segment *seg, /* Import replicator segment */ static int _replicator_text_import(struct lv_segment *seg, const struct config_node *sn, - struct dm_hash_table *pv_hash __attribute((unused))) + struct dm_hash_table *pv_hash __attribute__((unused))) { const struct config_node *cn; struct logical_volume *rlog_lv; @@ -377,8 +377,8 @@ static int _replicator_target_percent(void **target_state, /* Check for module presence */ static int _replicator_target_present(struct cmd_context *cmd, - const struct lv_segment *seg __attribute((unused)), - unsigned *attributes __attribute((unused))) + const struct lv_segment *seg __attribute__((unused)), + unsigned *attributes __attribute__((unused))) { static int _checked = 0; static int _present = 0; @@ -394,7 +394,7 @@ static int _replicator_target_present(struct cmd_context *cmd, #endif static int _replicator_modules_needed(struct dm_pool *mem, - const struct lv_segment *seg __attribute((unused)), + const struct lv_segment *seg __attribute__((unused)), struct dm_list *modules) { if (!str_list_add(mem, modules, REPLICATOR_MODULE)) @@ -520,7 +520,7 @@ static int _add_device(struct lv_segment *seg, /* Import replicator segment */ static int _replicator_dev_text_import(struct lv_segment *seg, const struct config_node *sn, - struct dm_hash_table *pv_hash __attribute((unused))) + struct dm_hash_table *pv_hash __attribute__((unused))) { const struct config_node *cn; struct logical_volume *replicator; @@ -721,8 +721,8 @@ static int _replicator_dev_target_percent(void **target_state, /* Check for module presence */ static int _replicator_dev_target_present(struct cmd_context *cmd, - const struct lv_segment *seg __attribute((unused)), - unsigned *attributes __attribute((unused))) + const struct lv_segment *seg __attribute__((unused)), + unsigned *attributes __attribute__((unused))) { static int _checked = 0; static int _present = 0; diff --git a/lib/report/report.c b/lib/report/report.c index 9a7633412..b3f6544f5 100644 --- a/lib/report/report.c +++ b/lib/report/report.c @@ -56,16 +56,16 @@ static const int32_t _minusone32 = INT32_C(-1); /* * Data-munging functions to prepare each data type for display and sorting */ -static int _string_disp(struct dm_report *rh, struct dm_pool *mem __attribute((unused)), +static int _string_disp(struct dm_report *rh, struct dm_pool *mem __attribute__((unused)), struct dm_report_field *field, - const void *data, void *private __attribute((unused))) + const void *data, void *private __attribute__((unused))) { return dm_report_field_string(rh, field, (const char **) data); } -static int _dev_name_disp(struct dm_report *rh, struct dm_pool *mem __attribute((unused)), +static int _dev_name_disp(struct dm_report *rh, struct dm_pool *mem __attribute__((unused)), struct dm_report_field *field, - const void *data, void *private __attribute((unused))) + const void *data, void *private __attribute__((unused))) { const char *name = dev_name(*(const struct device * const *) data); @@ -147,23 +147,23 @@ static int _format_pvsegs(struct dm_pool *mem, struct dm_report_field *field, return 1; } -static int _devices_disp(struct dm_report *rh __attribute((unused)), struct dm_pool *mem, +static int _devices_disp(struct dm_report *rh __attribute__((unused)), struct dm_pool *mem, struct dm_report_field *field, - const void *data, void *private __attribute((unused))) + const void *data, void *private __attribute__((unused))) { return _format_pvsegs(mem, field, data, 0); } -static int _peranges_disp(struct dm_report *rh __attribute((unused)), struct dm_pool *mem, +static int _peranges_disp(struct dm_report *rh __attribute__((unused)), struct dm_pool *mem, struct dm_report_field *field, - const void *data, void *private __attribute((unused))) + const void *data, void *private __attribute__((unused))) { return _format_pvsegs(mem, field, data, 1); } -static int _tags_disp(struct dm_report *rh __attribute((unused)), struct dm_pool *mem, +static int _tags_disp(struct dm_report *rh __attribute__((unused)), struct dm_pool *mem, struct dm_report_field *field, - const void *data, void *private __attribute((unused))) + const void *data, void *private __attribute__((unused))) { const struct dm_list *tags = (const struct dm_list *) data; struct str_list *sl; @@ -238,9 +238,9 @@ static int _pvfmt_disp(struct dm_report *rh, struct dm_pool *mem, return _string_disp(rh, mem, field, &pv->fmt->name, private); } -static int _lvkmaj_disp(struct dm_report *rh, struct dm_pool *mem __attribute((unused)), +static int _lvkmaj_disp(struct dm_report *rh, struct dm_pool *mem __attribute__((unused)), struct dm_report_field *field, - const void *data, void *private __attribute((unused))) + const void *data, void *private __attribute__((unused))) { const struct logical_volume *lv = (const struct logical_volume *) data; struct lvinfo info; @@ -251,9 +251,9 @@ static int _lvkmaj_disp(struct dm_report *rh, struct dm_pool *mem __attribute((u return dm_report_field_int32(rh, field, &_minusone32); } -static int _lvkmin_disp(struct dm_report *rh, struct dm_pool *mem __attribute((unused)), +static int _lvkmin_disp(struct dm_report *rh, struct dm_pool *mem __attribute__((unused)), struct dm_report_field *field, - const void *data, void *private __attribute((unused))) + const void *data, void *private __attribute__((unused))) { const struct logical_volume *lv = (const struct logical_volume *) data; struct lvinfo info; @@ -280,9 +280,9 @@ static int _lv_mimage_in_sync(const struct logical_volume *lv) return (percent_range == PERCENT_100) ? 1 : 0; } -static int _lvstatus_disp(struct dm_report *rh __attribute((unused)), struct dm_pool *mem, +static int _lvstatus_disp(struct dm_report *rh __attribute__((unused)), struct dm_pool *mem, struct dm_report_field *field, - const void *data, void *private __attribute((unused))) + const void *data, void *private __attribute__((unused))) { const struct logical_volume *lv = (const struct logical_volume *) data; struct lvinfo info; @@ -386,9 +386,9 @@ out: return 1; } -static int _pvstatus_disp(struct dm_report *rh __attribute((unused)), struct dm_pool *mem, +static int _pvstatus_disp(struct dm_report *rh __attribute__((unused)), struct dm_pool *mem, struct dm_report_field *field, - const void *data, void *private __attribute((unused))) + const void *data, void *private __attribute__((unused))) { const uint32_t status = *(const uint32_t *) data; char *repstr; @@ -412,9 +412,9 @@ static int _pvstatus_disp(struct dm_report *rh __attribute((unused)), struct dm_ return 1; } -static int _vgstatus_disp(struct dm_report *rh __attribute((unused)), struct dm_pool *mem, +static int _vgstatus_disp(struct dm_report *rh __attribute__((unused)), struct dm_pool *mem, struct dm_report_field *field, - const void *data, void *private __attribute((unused))) + const void *data, void *private __attribute__((unused))) { const struct volume_group *vg = (const struct volume_group *) data; char *repstr; @@ -455,10 +455,10 @@ static int _vgstatus_disp(struct dm_report *rh __attribute((unused)), struct dm_ return 1; } -static int _segtype_disp(struct dm_report *rh __attribute((unused)), - struct dm_pool *mem __attribute((unused)), +static int _segtype_disp(struct dm_report *rh __attribute__((unused)), + struct dm_pool *mem __attribute__((unused)), struct dm_report_field *field, - const void *data, void *private __attribute((unused))) + const void *data, void *private __attribute__((unused))) { const struct lv_segment *seg = (const struct lv_segment *) data; @@ -471,9 +471,9 @@ static int _segtype_disp(struct dm_report *rh __attribute((unused)), return 1; } -static int _loglv_disp(struct dm_report *rh, struct dm_pool *mem __attribute((unused)), +static int _loglv_disp(struct dm_report *rh, struct dm_pool *mem __attribute__((unused)), struct dm_report_field *field, - const void *data, void *private __attribute((unused))) + const void *data, void *private __attribute__((unused))) { const struct logical_volume *lv = (const struct logical_volume *) data; struct lv_segment *seg; @@ -491,7 +491,7 @@ static int _loglv_disp(struct dm_report *rh, struct dm_pool *mem __attribute((un static int _lvname_disp(struct dm_report *rh, struct dm_pool *mem, struct dm_report_field *field, - const void *data, void *private __attribute((unused))) + const void *data, void *private __attribute__((unused))) { const struct logical_volume *lv = (const struct logical_volume *) data; char *repstr, *lvname; @@ -525,7 +525,7 @@ static int _lvname_disp(struct dm_report *rh, struct dm_pool *mem, static int _lvpath_disp(struct dm_report *rh, struct dm_pool *mem, struct dm_report_field *field, - const void *data, void *private __attribute((unused))) + const void *data, void *private __attribute__((unused))) { const struct logical_volume *lv = (const struct logical_volume *) data; char *repstr; @@ -560,9 +560,9 @@ static int _origin_disp(struct dm_report *rh, struct dm_pool *mem, return 1; } -static int _movepv_disp(struct dm_report *rh, struct dm_pool *mem __attribute((unused)), +static int _movepv_disp(struct dm_report *rh, struct dm_pool *mem __attribute__((unused)), struct dm_report_field *field, - const void *data, void *private __attribute((unused))) + const void *data, void *private __attribute__((unused))) { const struct logical_volume *lv = (const struct logical_volume *) data; const char *name; @@ -579,9 +579,9 @@ static int _movepv_disp(struct dm_report *rh, struct dm_pool *mem __attribute((u return 1; } -static int _convertlv_disp(struct dm_report *rh, struct dm_pool *mem __attribute((unused)), +static int _convertlv_disp(struct dm_report *rh, struct dm_pool *mem __attribute__((unused)), struct dm_report_field *field, - const void *data, void *private __attribute((unused))) + const void *data, void *private __attribute__((unused))) { const struct logical_volume *lv = (const struct logical_volume *) data; const char *name = NULL; @@ -605,7 +605,7 @@ static int _convertlv_disp(struct dm_report *rh, struct dm_pool *mem __attribute return 1; } -static int _size32_disp(struct dm_report *rh __attribute((unused)), struct dm_pool *mem, +static int _size32_disp(struct dm_report *rh __attribute__((unused)), struct dm_pool *mem, struct dm_report_field *field, const void *data, void *private) { @@ -633,7 +633,7 @@ static int _size32_disp(struct dm_report *rh __attribute((unused)), struct dm_po return 1; } -static int _size64_disp(struct dm_report *rh __attribute((unused)), +static int _size64_disp(struct dm_report *rh __attribute__((unused)), struct dm_pool *mem, struct dm_report_field *field, const void *data, void *private) @@ -663,7 +663,7 @@ static int _size64_disp(struct dm_report *rh __attribute((unused)), static int _lvreadahead_disp(struct dm_report *rh, struct dm_pool *mem, struct dm_report_field *field, - const void *data, void *private __attribute((unused))) + const void *data, void *private __attribute__((unused))) { const struct logical_volume *lv = (const struct logical_volume *) data; @@ -714,10 +714,10 @@ static int _segstart_disp(struct dm_report *rh, struct dm_pool *mem, } static int _segstartpe_disp(struct dm_report *rh, - struct dm_pool *mem __attribute((unused)), + struct dm_pool *mem __attribute__((unused)), struct dm_report_field *field, const void *data, - void *private __attribute((unused))) + void *private __attribute__((unused))) { const struct lv_segment *seg = (const struct lv_segment *) data; @@ -835,9 +835,9 @@ static int _vgfree_disp(struct dm_report *rh, struct dm_pool *mem, return _size64_disp(rh, mem, field, &freespace, private); } -static int _uuid_disp(struct dm_report *rh __attribute((unused)), struct dm_pool *mem, +static int _uuid_disp(struct dm_report *rh __attribute__((unused)), struct dm_pool *mem, struct dm_report_field *field, - const void *data, void *private __attribute((unused))) + const void *data, void *private __attribute__((unused))) { char *repstr = NULL; @@ -853,16 +853,16 @@ static int _uuid_disp(struct dm_report *rh __attribute((unused)), struct dm_pool return 1; } -static int _uint32_disp(struct dm_report *rh, struct dm_pool *mem __attribute((unused)), +static int _uint32_disp(struct dm_report *rh, struct dm_pool *mem __attribute__((unused)), struct dm_report_field *field, - const void *data, void *private __attribute((unused))) + const void *data, void *private __attribute__((unused))) { return dm_report_field_uint32(rh, field, data); } -static int _int32_disp(struct dm_report *rh, struct dm_pool *mem __attribute((unused)), +static int _int32_disp(struct dm_report *rh, struct dm_pool *mem __attribute__((unused)), struct dm_report_field *field, - const void *data, void *private __attribute((unused))) + const void *data, void *private __attribute__((unused))) { return dm_report_field_int32(rh, field, data); } @@ -1062,9 +1062,9 @@ static int _snapcount_disp(struct dm_report *rh, struct dm_pool *mem, return _uint32_disp(rh, mem, field, &count, private); } -static int _snpercent_disp(struct dm_report *rh __attribute((unused)), struct dm_pool *mem, +static int _snpercent_disp(struct dm_report *rh __attribute__((unused)), struct dm_pool *mem, struct dm_report_field *field, - const void *data, void *private __attribute((unused))) + const void *data, void *private __attribute__((unused))) { const struct logical_volume *lv = (const struct logical_volume *) data; struct lvinfo info; @@ -1122,10 +1122,10 @@ static int _snpercent_disp(struct dm_report *rh __attribute((unused)), struct dm return 1; } -static int _copypercent_disp(struct dm_report *rh __attribute((unused)), +static int _copypercent_disp(struct dm_report *rh __attribute__((unused)), struct dm_pool *mem, struct dm_report_field *field, - const void *data, void *private __attribute((unused))) + const void *data, void *private __attribute__((unused))) { struct logical_volume *lv = (struct logical_volume *) data; float percent; diff --git a/lib/snapshot/snapshot.c b/lib/snapshot/snapshot.c index 62766cb2b..dda0bc7ae 100644 --- a/lib/snapshot/snapshot.c +++ b/lib/snapshot/snapshot.c @@ -32,7 +32,7 @@ static const char *_snap_name(const struct lv_segment *seg) } static int _snap_text_import(struct lv_segment *seg, const struct config_node *sn, - struct dm_hash_table *pv_hash __attribute((unused))) + struct dm_hash_table *pv_hash __attribute__((unused))) { uint32_t chunk_size; const char *org_name, *cow_name; @@ -103,11 +103,11 @@ static int _snap_target_status_compatible(const char *type) } #ifdef DEVMAPPER_SUPPORT -static int _snap_target_percent(void **target_state __attribute((unused)), +static int _snap_target_percent(void **target_state __attribute__((unused)), percent_range_t *percent_range, - struct dm_pool *mem __attribute((unused)), - struct cmd_context *cmd __attribute((unused)), - struct lv_segment *seg __attribute((unused)), + struct dm_pool *mem __attribute__((unused)), + struct cmd_context *cmd __attribute__((unused)), + struct lv_segment *seg __attribute__((unused)), char *params, uint64_t *total_numerator, uint64_t *total_denominator) { @@ -141,7 +141,7 @@ static int _snap_target_percent(void **target_state __attribute((unused)), static int _snap_target_present(struct cmd_context *cmd, const struct lv_segment *seg, - unsigned *attributes __attribute((unused))) + unsigned *attributes __attribute__((unused))) { static int _snap_checked = 0; static int _snap_merge_checked = 0; @@ -249,7 +249,7 @@ static int _target_registered(struct lv_segment *seg, int *pending) /* FIXME This gets run while suspended and performs banned operations. */ static int _target_set_events(struct lv_segment *seg, - int events __attribute((unused)), int set) + int events __attribute__((unused)), int set) { char *dso, *uuid; struct volume_group *vg = seg->lv->vg; @@ -293,7 +293,7 @@ static int _target_unregister_events(struct lv_segment *seg, #endif static int _snap_modules_needed(struct dm_pool *mem, - const struct lv_segment *seg __attribute((unused)), + const struct lv_segment *seg __attribute__((unused)), struct dm_list *modules) { if (!str_list_add(mem, modules, "snapshot")) { diff --git a/lib/striped/striped.c b/lib/striped/striped.c index 3b80ea4c3..01fbc1e39 100644 --- a/lib/striped/striped.c +++ b/lib/striped/striped.c @@ -160,12 +160,12 @@ static int _striped_merge_segments(struct lv_segment *seg1, struct lv_segment *s #ifdef DEVMAPPER_SUPPORT static int _striped_add_target_line(struct dev_manager *dm, - struct dm_pool *mem __attribute((unused)), - struct cmd_context *cmd __attribute((unused)), - void **target_state __attribute((unused)), + struct dm_pool *mem __attribute__((unused)), + struct cmd_context *cmd __attribute__((unused)), + void **target_state __attribute__((unused)), struct lv_segment *seg, struct dm_tree_node *node, uint64_t len, - uint32_t *pvmove_mirror_count __attribute((unused))) + uint32_t *pvmove_mirror_count __attribute__((unused))) { if (!seg->area_count) { log_error(INTERNAL_ERROR "striped add_target_line called " @@ -183,8 +183,8 @@ static int _striped_add_target_line(struct dev_manager *dm, } static int _striped_target_present(struct cmd_context *cmd, - const struct lv_segment *seg __attribute((unused)), - unsigned *attributes __attribute((unused))) + const struct lv_segment *seg __attribute__((unused)), + unsigned *attributes __attribute__((unused))) { static int _striped_checked = 0; static int _striped_present = 0; diff --git a/lib/unknown/unknown.c b/lib/unknown/unknown.c index 8c8a03089..6dc00f666 100644 --- a/lib/unknown/unknown.c +++ b/lib/unknown/unknown.c @@ -62,13 +62,13 @@ static int _unknown_text_export(const struct lv_segment *seg, struct formatter * } #ifdef DEVMAPPER_SUPPORT -static int _unknown_add_target_line(struct dev_manager *dm __attribute((unused)), - struct dm_pool *mem __attribute((unused)), - struct cmd_context *cmd __attribute((unused)), - void **target_state __attribute((unused)), - struct lv_segment *seg __attribute((unused)), +static int _unknown_add_target_line(struct dev_manager *dm __attribute__((unused)), + struct dm_pool *mem __attribute__((unused)), + struct cmd_context *cmd __attribute__((unused)), + void **target_state __attribute__((unused)), + struct lv_segment *seg __attribute__((unused)), struct dm_tree_node *node, uint64_t len, - uint32_t *pvmove_mirror_count __attribute((unused))) + uint32_t *pvmove_mirror_count __attribute__((unused))) { return dm_tree_node_add_error_target(node, len); } diff --git a/lib/zero/zero.c b/lib/zero/zero.c index 7b3e62e65..7e5ffa6a3 100644 --- a/lib/zero/zero.c +++ b/lib/zero/zero.c @@ -39,20 +39,20 @@ static int _zero_merge_segments(struct lv_segment *seg1, struct lv_segment *seg2 } #ifdef DEVMAPPER_SUPPORT -static int _zero_add_target_line(struct dev_manager *dm __attribute((unused)), - struct dm_pool *mem __attribute((unused)), - struct cmd_context *cmd __attribute((unused)), - void **target_state __attribute((unused)), - struct lv_segment *seg __attribute((unused)), +static int _zero_add_target_line(struct dev_manager *dm __attribute__((unused)), + struct dm_pool *mem __attribute__((unused)), + struct cmd_context *cmd __attribute__((unused)), + void **target_state __attribute__((unused)), + struct lv_segment *seg __attribute__((unused)), struct dm_tree_node *node,uint64_t len, - uint32_t *pvmove_mirror_count __attribute((unused))) + uint32_t *pvmove_mirror_count __attribute__((unused))) { return dm_tree_node_add_zero_target(node, len); } static int _zero_target_present(struct cmd_context *cmd, - const struct lv_segment *seg __attribute((unused)), - unsigned *attributes __attribute((unused))) + const struct lv_segment *seg __attribute__((unused)), + unsigned *attributes __attribute__((unused))) { static int _zero_checked = 0; static int _zero_present = 0; @@ -67,7 +67,7 @@ static int _zero_target_present(struct cmd_context *cmd, #endif static int _zero_modules_needed(struct dm_pool *mem, - const struct lv_segment *seg __attribute((unused)), + const struct lv_segment *seg __attribute__((unused)), struct dm_list *modules) { if (!str_list_add(mem, modules, "zero")) { diff --git a/libdm/datastruct/hash.c b/libdm/datastruct/hash.c index 3c3d8a023..cd722cd81 100644 --- a/libdm/datastruct/hash.c +++ b/libdm/datastruct/hash.c @@ -236,13 +236,13 @@ void dm_hash_wipe(struct dm_hash_table *t) t->num_nodes = 0u; } -char *dm_hash_get_key(struct dm_hash_table *t __attribute((unused)), +char *dm_hash_get_key(struct dm_hash_table *t __attribute__((unused)), struct dm_hash_node *n) { return n->key; } -void *dm_hash_get_data(struct dm_hash_table *t __attribute((unused)), +void *dm_hash_get_data(struct dm_hash_table *t __attribute__((unused)), struct dm_hash_node *n) { return n->data; diff --git a/libdm/libdevmapper.h b/libdm/libdevmapper.h index fa868b154..6e21faae9 100644 --- a/libdm/libdevmapper.h +++ b/libdm/libdevmapper.h @@ -244,7 +244,7 @@ int dm_is_dm_major(uint32_t major); * Release library resources */ void dm_lib_release(void); -void dm_lib_exit(void) __attribute((destructor)); +void dm_lib_exit(void) __attribute__((destructor)); /* * Use NULL for all devices. diff --git a/libdm/libdm-common.c b/libdm/libdm-common.c index 032803543..438e46140 100644 --- a/libdm/libdm-common.c +++ b/libdm/libdm-common.c @@ -71,8 +71,8 @@ static int _udev_checking = 1; */ static void _default_log_line(int level, - const char *file __attribute((unused)), - int line __attribute((unused)), int dm_errno, + const char *file __attribute__((unused)), + int line __attribute__((unused)), int dm_errno, const char *f, va_list ap) { int use_stderr = level & _LOG_STDERR; @@ -94,8 +94,8 @@ static void _default_log_line(int level, } static void _default_log_with_errno(int level, - const char *file __attribute((unused)), - int line __attribute((unused)), int dm_errno, + const char *file __attribute__((unused)), + int line __attribute__((unused)), int dm_errno, const char *f, ...) { va_list ap; diff --git a/libdm/libdm-deptree.c b/libdm/libdm-deptree.c index fac9d213e..0e491273d 100644 --- a/libdm/libdm-deptree.c +++ b/libdm/libdm-deptree.c @@ -1435,7 +1435,7 @@ do {\ * * Returns: 1 on success, 0 on failure */ -static int _emit_areas_line(struct dm_task *dmt __attribute((unused)), +static int _emit_areas_line(struct dm_task *dmt __attribute__((unused)), struct load_segment *seg, char *params, size_t paramsize, int *pos) { diff --git a/libdm/libdm-string.c b/libdm/libdm-string.c index c6f101bcc..ce05a10b4 100644 --- a/libdm/libdm-string.c +++ b/libdm/libdm-string.c @@ -38,7 +38,7 @@ static int _isword(int c) * Returns number of words. */ int dm_split_words(char *buffer, unsigned max, - unsigned ignore_comments __attribute((unused)), + unsigned ignore_comments __attribute__((unused)), char **argv) { unsigned arg; diff --git a/libdm/mm/dbg_malloc.c b/libdm/mm/dbg_malloc.c index 4a2e1cc4e..0add7b621 100644 --- a/libdm/mm/dbg_malloc.c +++ b/libdm/mm/dbg_malloc.c @@ -231,8 +231,8 @@ void dm_bounds_check_debug(void) } } -void *dm_malloc_aux(size_t s, const char *file __attribute((unused)), - int line __attribute((unused))) +void *dm_malloc_aux(size_t s, const char *file __attribute__((unused)), + int line __attribute__((unused))) { if (s > 50000000) { log_error("Huge memory allocation (size %" PRIsize_t diff --git a/liblvm/lvm_lv.c b/liblvm/lvm_lv.c index cfa5c18b6..e67e7fe76 100644 --- a/liblvm/lvm_lv.c +++ b/liblvm/lvm_lv.c @@ -41,7 +41,7 @@ uint64_t lvm_lv_get_size(const lv_t lv) const char *lvm_lv_get_uuid(const lv_t lv) { - char uuid[64] __attribute((aligned(8))); + char uuid[64] __attribute__((aligned(8))); if (!id_write_format(&lv->lvid.id[1], uuid, sizeof(uuid))) { log_error(INTERNAL_ERROR "unable to convert uuid"); diff --git a/liblvm/lvm_pv.c b/liblvm/lvm_pv.c index 7926bff8e..db2383c79 100644 --- a/liblvm/lvm_pv.c +++ b/liblvm/lvm_pv.c @@ -19,7 +19,7 @@ const char *lvm_pv_get_uuid(const pv_t pv) { - char uuid[64] __attribute((aligned(8))); + char uuid[64] __attribute__((aligned(8))); if (!id_write_format(&pv->id, uuid, sizeof(uuid))) { log_error(INTERNAL_ERROR "Unable to convert uuid"); diff --git a/liblvm/lvm_vg.c b/liblvm/lvm_vg.c index 20aeb4f33..99558c74f 100644 --- a/liblvm/lvm_vg.c +++ b/liblvm/lvm_vg.c @@ -332,7 +332,7 @@ uint64_t lvm_vg_get_max_lv(const vg_t vg) const char *lvm_vg_get_uuid(const vg_t vg) { - char uuid[64] __attribute((aligned(8))); + char uuid[64] __attribute__((aligned(8))); if (!id_write_format(&vg->id, uuid, sizeof(uuid))) { log_error(INTERNAL_ERROR "Unable to convert uuid"); diff --git a/tools/dmsetup.c b/tools/dmsetup.c index 5e71542a9..10b9e0bd7 100644 --- a/tools/dmsetup.c +++ b/tools/dmsetup.c @@ -502,7 +502,7 @@ static int _set_task_device(struct dm_task *dmt, const char *name, int optional) return 1; } -static int _load(int argc, char **argv, void *data __attribute((unused))) +static int _load(int argc, char **argv, void *data __attribute__((unused))) { int r = 0; struct dm_task *dmt; @@ -562,7 +562,7 @@ static int _load(int argc, char **argv, void *data __attribute((unused))) return r; } -static int _create(int argc, char **argv, void *data __attribute((unused))) +static int _create(int argc, char **argv, void *data __attribute__((unused))) { int r = 0; struct dm_task *dmt; @@ -644,7 +644,7 @@ static int _create(int argc, char **argv, void *data __attribute((unused))) return r; } -static int _rename(int argc, char **argv, void *data __attribute((unused))) +static int _rename(int argc, char **argv, void *data __attribute__((unused))) { int r = 0; struct dm_task *dmt; @@ -691,7 +691,7 @@ static int _rename(int argc, char **argv, void *data __attribute((unused))) return r; } -static int _message(int argc, char **argv, void *data __attribute((unused))) +static int _message(int argc, char **argv, void *data __attribute__((unused))) { int r = 0, i; size_t sz = 1; @@ -758,7 +758,7 @@ static int _message(int argc, char **argv, void *data __attribute((unused))) return r; } -static int _setgeometry(int argc, char **argv, void *data __attribute((unused))) +static int _setgeometry(int argc, char **argv, void *data __attribute__((unused))) { int r = 0; struct dm_task *dmt; @@ -797,7 +797,7 @@ static int _setgeometry(int argc, char **argv, void *data __attribute((unused))) return r; } -static int _splitname(int argc, char **argv, void *data __attribute((unused))) +static int _splitname(int argc, char **argv, void *data __attribute__((unused))) { struct dmsetup_report_obj obj; int r = 1; @@ -831,7 +831,7 @@ static uint32_t _get_cookie_value(const char *str_value) return (uint32_t) value; } -static int _udevflags(int args, char **argv, void *data __attribute((unused))) +static int _udevflags(int args, char **argv, void *data __attribute__((unused))) { uint32_t cookie; uint16_t flags; @@ -873,7 +873,7 @@ static int _udevflags(int args, char **argv, void *data __attribute((unused))) return 1; } -static int _udevcomplete(int argc, char **argv, void *data __attribute((unused))) +static int _udevcomplete(int argc, char **argv, void *data __attribute__((unused))) { uint32_t cookie; @@ -899,7 +899,7 @@ static int _udevcomplete(int argc, char **argv, void *data __attribute((unused)) static const char _cmd_not_supported[] = "Command not supported. Recompile with \"--enable-udev-sync\" to enable."; static int _udevcreatecookie(int argc, char **argv, - void *data __attribute((unused))) + void *data __attribute__((unused))) { log_error(_cmd_not_supported); @@ -907,21 +907,21 @@ static int _udevcreatecookie(int argc, char **argv, } static int _udevreleasecookie(int argc, char **argv, - void *data __attribute((unused))) + void *data __attribute__((unused))) { log_error(_cmd_not_supported); return 0; } -static int _udevcomplete_all(int argc __attribute((unused)), char **argv __attribute((unused)), void *data __attribute((unused))) +static int _udevcomplete_all(int argc __attribute__((unused)), char **argv __attribute__((unused)), void *data __attribute__((unused))) { log_error(_cmd_not_supported); return 0; } -static int _udevcookies(int argc __attribute((unused)), char **argv __attribute((unused)), void *data __attribute((unused))) +static int _udevcookies(int argc __attribute__((unused)), char **argv __attribute__((unused)), void *data __attribute__((unused))) { log_error(_cmd_not_supported); @@ -996,7 +996,7 @@ static int _set_up_udev_support(const char *dev_dir) } static int _udevcreatecookie(int argc, char **argv, - void *data __attribute((unused))) + void *data __attribute__((unused))) { uint32_t cookie; @@ -1010,7 +1010,7 @@ static int _udevcreatecookie(int argc, char **argv, } static int _udevreleasecookie(int argc, char **argv, - void *data __attribute((unused))) + void *data __attribute__((unused))) { if (argv[1] && !(_udev_cookie = _get_cookie_value(argv[1]))) return 0; @@ -1051,7 +1051,7 @@ static char _yes_no_prompt(const char *prompt, ...) return ret; } -static int _udevcomplete_all(int argc __attribute((unused)), char **argv __attribute((unused)), void *data __attribute((unused))) +static int _udevcomplete_all(int argc __attribute__((unused)), char **argv __attribute__((unused)), void *data __attribute__((unused))) { int max_id, id, sid; struct seminfo sinfo; @@ -1100,7 +1100,7 @@ static int _udevcomplete_all(int argc __attribute((unused)), char **argv __attri return 1; } -static int _udevcookies(int argc __attribute((unused)), char **argv __attribute((unused)), void *data __attribute((unused))) +static int _udevcookies(int argc __attribute__((unused)), char **argv __attribute__((unused)), void *data __attribute__((unused))) { int max_id, id, sid; struct seminfo sinfo; @@ -1139,7 +1139,7 @@ static int _udevcookies(int argc __attribute((unused)), char **argv __attribute( } #endif /* UDEV_SYNC_SUPPORT */ -static int _version(int argc __attribute((unused)), char **argv __attribute((unused)), void *data __attribute((unused))) +static int _version(int argc __attribute__((unused)), char **argv __attribute__((unused)), void *data __attribute__((unused))) { char version[80]; @@ -1216,22 +1216,22 @@ static int _simple(int task, const char *name, uint32_t event_nr, int display) return r; } -static int _suspend(int argc, char **argv, void *data __attribute((unused))) +static int _suspend(int argc, char **argv, void *data __attribute__((unused))) { return _simple(DM_DEVICE_SUSPEND, argc > 1 ? argv[1] : NULL, 0, 1); } -static int _resume(int argc, char **argv, void *data __attribute((unused))) +static int _resume(int argc, char **argv, void *data __attribute__((unused))) { return _simple(DM_DEVICE_RESUME, argc > 1 ? argv[1] : NULL, 0, 1); } -static int _clear(int argc, char **argv, void *data __attribute((unused))) +static int _clear(int argc, char **argv, void *data __attribute__((unused))) { return _simple(DM_DEVICE_CLEAR, argc > 1 ? argv[1] : NULL, 0, 1); } -static int _wait(int argc, char **argv, void *data __attribute((unused))) +static int _wait(int argc, char **argv, void *data __attribute__((unused))) { const char *name = NULL; @@ -1325,7 +1325,7 @@ static uint64_t _get_device_size(const char *name) return size; } -static int _error_device(int argc __attribute((unused)), char **argv __attribute((unused)), void *data) +static int _error_device(int argc __attribute__((unused)), char **argv __attribute__((unused)), void *data) { struct dm_names *names = (struct dm_names *) data; struct dm_task *dmt; @@ -1373,7 +1373,7 @@ error: return r; } -static int _remove(int argc, char **argv, void *data __attribute((unused))) +static int _remove(int argc, char **argv, void *data __attribute__((unused))) { int r; @@ -1383,14 +1383,14 @@ static int _remove(int argc, char **argv, void *data __attribute((unused))) return _simple(DM_DEVICE_REMOVE, argc > 1 ? argv[1] : NULL, 0, 0); } -static int _count_devices(int argc __attribute((unused)), char **argv __attribute((unused)), void *data __attribute((unused))) +static int _count_devices(int argc __attribute__((unused)), char **argv __attribute__((unused)), void *data __attribute__((unused))) { _num_devices++; return 1; } -static int _remove_all(int argc __attribute((unused)), char **argv __attribute((unused)), void *data __attribute((unused))) +static int _remove_all(int argc __attribute__((unused)), char **argv __attribute__((unused)), void *data __attribute__((unused))) { int r; @@ -1428,7 +1428,7 @@ static void _display_dev(struct dm_task *dmt, const char *name) printf("%s\t(%u, %u)\n", name, info.major, info.minor); } -static int _mknodes(int argc, char **argv, void *data __attribute((unused))) +static int _mknodes(int argc, char **argv, void *data __attribute__((unused))) { return dm_mknodes(argc > 1 ? argv[1] : NULL); } @@ -1599,7 +1599,7 @@ static int _status(int argc, char **argv, void *data) } /* Show target names and their version numbers */ -static int _targets(int argc __attribute((unused)), char **argv __attribute((unused)), void *data __attribute((unused))) +static int _targets(int argc __attribute__((unused)), char **argv __attribute__((unused)), void *data __attribute__((unused))) { int r = 0; struct dm_task *dmt; @@ -1739,7 +1739,7 @@ static int _deps(int argc, char **argv, void *data) return r; } -static int _display_name(int argc __attribute((unused)), char **argv __attribute((unused)), void *data) +static int _display_name(int argc __attribute__((unused)), char **argv __attribute__((unused)), void *data) { struct dm_names *names = (struct dm_names *) data; @@ -1962,7 +1962,7 @@ static void _display_tree_attributes(struct dm_tree_node *node) } static void _display_tree_node(struct dm_tree_node *node, unsigned depth, - unsigned first_child __attribute((unused)), + unsigned first_child __attribute__((unused)), unsigned last_child, unsigned has_children) { int offset; @@ -2054,7 +2054,7 @@ static void _display_tree_walk_children(struct dm_tree_node *node, } } -static int _add_dep(int argc __attribute((unused)), char **argv __attribute((unused)), void *data) +static int _add_dep(int argc __attribute__((unused)), char **argv __attribute__((unused)), void *data) { struct dm_names *names = (struct dm_names *) data; @@ -2081,9 +2081,9 @@ static int _build_whole_deptree(void) return 1; } -static int _display_tree(int argc __attribute((unused)), - char **argv __attribute((unused)), - void *data __attribute((unused))) +static int _display_tree(int argc __attribute__((unused)), + char **argv __attribute__((unused)), + void *data __attribute__((unused))) { if (!_build_whole_deptree()) return 0; @@ -2100,9 +2100,9 @@ static int _display_tree(int argc __attribute((unused)), /* dm specific display functions */ static int _int32_disp(struct dm_report *rh, - struct dm_pool *mem __attribute((unused)), + struct dm_pool *mem __attribute__((unused)), struct dm_report_field *field, const void *data, - void *private __attribute((unused))) + void *private __attribute__((unused))) { const int32_t value = *(const int32_t *)data; @@ -2110,9 +2110,9 @@ static int _int32_disp(struct dm_report *rh, } static int _uint32_disp(struct dm_report *rh, - struct dm_pool *mem __attribute((unused)), + struct dm_pool *mem __attribute__((unused)), struct dm_report_field *field, const void *data, - void *private __attribute((unused))) + void *private __attribute__((unused))) { const uint32_t value = *(const int32_t *)data; @@ -2120,9 +2120,9 @@ static int _uint32_disp(struct dm_report *rh, } static int _dm_name_disp(struct dm_report *rh, - struct dm_pool *mem __attribute((unused)), + struct dm_pool *mem __attribute__((unused)), struct dm_report_field *field, const void *data, - void *private __attribute((unused))) + void *private __attribute__((unused))) { const char *name = dm_task_get_name((const struct dm_task *) data); @@ -2130,9 +2130,9 @@ static int _dm_name_disp(struct dm_report *rh, } static int _dm_uuid_disp(struct dm_report *rh, - struct dm_pool *mem __attribute((unused)), + struct dm_pool *mem __attribute__((unused)), struct dm_report_field *field, - const void *data, void *private __attribute((unused))) + const void *data, void *private __attribute__((unused))) { const char *uuid = dm_task_get_uuid((const struct dm_task *) data); @@ -2143,9 +2143,9 @@ static int _dm_uuid_disp(struct dm_report *rh, } static int _dm_read_ahead_disp(struct dm_report *rh, - struct dm_pool *mem __attribute((unused)), + struct dm_pool *mem __attribute__((unused)), struct dm_report_field *field, const void *data, - void *private __attribute((unused))) + void *private __attribute__((unused))) { uint32_t value; @@ -2156,9 +2156,9 @@ static int _dm_read_ahead_disp(struct dm_report *rh, } static int _dm_info_status_disp(struct dm_report *rh, - struct dm_pool *mem __attribute((unused)), + struct dm_pool *mem __attribute__((unused)), struct dm_report_field *field, const void *data, - void *private __attribute((unused))) + void *private __attribute__((unused))) { char buf[5]; const char *s = buf; @@ -2174,10 +2174,10 @@ static int _dm_info_status_disp(struct dm_report *rh, } static int _dm_info_table_loaded_disp(struct dm_report *rh, - struct dm_pool *mem __attribute((unused)), + struct dm_pool *mem __attribute__((unused)), struct dm_report_field *field, const void *data, - void *private __attribute((unused))) + void *private __attribute__((unused))) { const struct dm_info *info = data; @@ -2198,10 +2198,10 @@ static int _dm_info_table_loaded_disp(struct dm_report *rh, } static int _dm_info_suspended_disp(struct dm_report *rh, - struct dm_pool *mem __attribute((unused)), + struct dm_pool *mem __attribute__((unused)), struct dm_report_field *field, const void *data, - void *private __attribute((unused))) + void *private __attribute__((unused))) { const struct dm_info *info = data; @@ -2214,10 +2214,10 @@ static int _dm_info_suspended_disp(struct dm_report *rh, } static int _dm_info_read_only_disp(struct dm_report *rh, - struct dm_pool *mem __attribute((unused)), + struct dm_pool *mem __attribute__((unused)), struct dm_report_field *field, const void *data, - void *private __attribute((unused))) + void *private __attribute__((unused))) { const struct dm_info *info = data; @@ -2431,35 +2431,35 @@ static int _dm_deps_disp(struct dm_report *rh, struct dm_pool *mem, } static int _dm_subsystem_disp(struct dm_report *rh, - struct dm_pool *mem __attribute((unused)), + struct dm_pool *mem __attribute__((unused)), struct dm_report_field *field, const void *data, - void *private __attribute((unused))) + void *private __attribute__((unused))) { return dm_report_field_string(rh, field, (const char **) data); } static int _dm_vg_name_disp(struct dm_report *rh, - struct dm_pool *mem __attribute((unused)), + struct dm_pool *mem __attribute__((unused)), struct dm_report_field *field, const void *data, - void *private __attribute((unused))) + void *private __attribute__((unused))) { return dm_report_field_string(rh, field, (const char **) data); } static int _dm_lv_name_disp(struct dm_report *rh, - struct dm_pool *mem __attribute((unused)), + struct dm_pool *mem __attribute__((unused)), struct dm_report_field *field, const void *data, - void *private __attribute((unused))) + void *private __attribute__((unused))) { return dm_report_field_string(rh, field, (const char **) data); } static int _dm_lv_layer_name_disp(struct dm_report *rh, - struct dm_pool *mem __attribute((unused)), + struct dm_pool *mem __attribute__((unused)), struct dm_report_field *field, const void *data, - void *private __attribute((unused))) + void *private __attribute__((unused))) { return dm_report_field_string(rh, field, (const char **) data); @@ -2743,9 +2743,9 @@ static void _losetup_usage(FILE *out) "[-o offset] [-f|loop_device] [file]\n\n"); } -static int _help(int argc __attribute((unused)), - char **argv __attribute((unused)), - void *data __attribute((unused))) +static int _help(int argc __attribute__((unused)), + char **argv __attribute__((unused)), + void *data __attribute__((unused))) { _usage(stderr); @@ -2899,7 +2899,7 @@ error: * create a table for a mapped device using the loop target. */ static int _loop_table(char *table, size_t tlen, char *file, - char *dev __attribute((unused)), off_t off) + char *dev __attribute__((unused)), off_t off) { struct stat fbuf; off_t size, sectors; diff --git a/tools/formats.c b/tools/formats.c index 9442eaee5..a04f23d49 100644 --- a/tools/formats.c +++ b/tools/formats.c @@ -15,8 +15,8 @@ #include "tools.h" -int formats(struct cmd_context *cmd, int argc __attribute((unused)), - char **argv __attribute((unused))) +int formats(struct cmd_context *cmd, int argc __attribute__((unused)), + char **argv __attribute__((unused))) { display_formats(cmd); diff --git a/tools/lvchange.c b/tools/lvchange.c index 126e61ae3..4186b53ca 100644 --- a/tools/lvchange.c +++ b/tools/lvchange.c @@ -515,7 +515,7 @@ static int lvchange_tag(struct cmd_context *cmd, struct logical_volume *lv, } static int lvchange_single(struct cmd_context *cmd, struct logical_volume *lv, - void *handle __attribute((unused))) + void *handle __attribute__((unused))) { int doit = 0, docmds = 0; int dmeventd_mode, archived = 0; diff --git a/tools/lvconvert.c b/tools/lvconvert.c index 7bfe273bd..ffdbd07f3 100644 --- a/tools/lvconvert.c +++ b/tools/lvconvert.c @@ -326,7 +326,7 @@ static int _read_params(struct lvconvert_params *lp, struct cmd_context *cmd, static struct volume_group *_get_lvconvert_vg(struct cmd_context *cmd, const char *name, - const char *uuid __attribute((unused))) + const char *uuid __attribute__((unused))) { dev_close_all(); @@ -338,11 +338,11 @@ static struct volume_group *_get_lvconvert_vg(struct cmd_context *cmd, NULL, 0); } -static struct logical_volume *_get_lvconvert_lv(struct cmd_context *cmd __attribute((unused)), +static struct logical_volume *_get_lvconvert_lv(struct cmd_context *cmd __attribute__((unused)), struct volume_group *vg, const char *name, const char *uuid, - uint32_t lv_type __attribute((unused))) + uint32_t lv_type __attribute__((unused))) { struct logical_volume *lv = find_lv(vg, name); @@ -355,7 +355,7 @@ static struct logical_volume *_get_lvconvert_lv(struct cmd_context *cmd __attrib static int _finish_lvconvert_mirror(struct cmd_context *cmd, struct volume_group *vg, struct logical_volume *lv, - struct dm_list *lvs_changed __attribute((unused))) + struct dm_list *lvs_changed __attribute__((unused))) { int r = 0; @@ -402,7 +402,7 @@ out: static int _finish_lvconvert_merge(struct cmd_context *cmd, struct volume_group *vg, struct logical_volume *lv, - struct dm_list *lvs_changed __attribute((unused))) + struct dm_list *lvs_changed __attribute__((unused))) { struct lv_segment *snap_seg = find_merging_cow(lv); if (!snap_seg) { @@ -422,7 +422,7 @@ static int _finish_lvconvert_merge(struct cmd_context *cmd, static progress_t _poll_merge_progress(struct cmd_context *cmd, struct logical_volume *lv, - const char *name __attribute((unused)), + const char *name __attribute__((unused)), struct daemon_parms *parms) { float percent = 0.0; @@ -605,7 +605,7 @@ static struct dm_list *_failed_pv_list(struct volume_group *vg) } static int _is_partial_lv(struct logical_volume *lv, - void *baton __attribute((unused))) + void *baton __attribute__((unused))) { return lv->status & PARTIAL_LV; } diff --git a/tools/lvcreate.c b/tools/lvcreate.c index d0e962f6d..de5b59cfb 100644 --- a/tools/lvcreate.c +++ b/tools/lvcreate.c @@ -236,7 +236,7 @@ static int _read_size_params(struct lvcreate_params *lp, * Generic mirror parameter checks. * FIXME: Should eventually be moved into lvm library. */ -static int _validate_mirror_params(const struct cmd_context *cmd __attribute((unused)), +static int _validate_mirror_params(const struct cmd_context *cmd __attribute__((unused)), const struct lvcreate_params *lp) { int pagesize = lvm_getpagesize(); diff --git a/tools/lvm-static.c b/tools/lvm-static.c index 036340f0c..1be4c2416 100644 --- a/tools/lvm-static.c +++ b/tools/lvm-static.c @@ -22,8 +22,8 @@ int main(int argc, char **argv) return lvm2_main(argc, argv); } -int lvm_shell(struct cmd_context *cmd __attribute((unused)), - struct cmdline_context *cmdline __attribute((unused))) +int lvm_shell(struct cmd_context *cmd __attribute__((unused)), + struct cmdline_context *cmdline __attribute__((unused))) { return 0; } diff --git a/tools/lvm.c b/tools/lvm.c index 0ca5cee7b..60f9a79af 100644 --- a/tools/lvm.c +++ b/tools/lvm.c @@ -122,7 +122,7 @@ static char *_list_args(const char *text, int state) /* Custom completion function */ static char **_completion(const char *text, int start_pos, - int end_pos __attribute((unused))) + int end_pos __attribute__((unused))) { char **match_list = NULL; int p = 0; diff --git a/tools/lvm2cmd.c b/tools/lvm2cmd.c index a8d09bf1c..1e1e059c4 100644 --- a/tools/lvm2cmd.c +++ b/tools/lvm2cmd.c @@ -20,8 +20,8 @@ void *lvm2_init(void) return cmdlib_lvm2_init(0); } -int lvm_shell(struct cmd_context *cmd __attribute((unused)), - struct cmdline_context *cmdline __attribute((unused))) +int lvm_shell(struct cmd_context *cmd __attribute__((unused)), + struct cmdline_context *cmdline __attribute__((unused))) { return 0; } diff --git a/tools/lvmchange.c b/tools/lvmchange.c index c4417c3ee..ff77e953d 100644 --- a/tools/lvmchange.c +++ b/tools/lvmchange.c @@ -15,8 +15,8 @@ #include "tools.h" -int lvmchange(struct cmd_context *cmd __attribute((unused)), - int argc __attribute((unused)), char **argv __attribute((unused))) +int lvmchange(struct cmd_context *cmd __attribute__((unused)), + int argc __attribute__((unused)), char **argv __attribute__((unused))) { log_error("With LVM2 and the device mapper, this program is obsolete."); return ECMD_FAILED; diff --git a/tools/lvmcmdline.c b/tools/lvmcmdline.c index 8ff74ac0f..6c66fab6f 100644 --- a/tools/lvmcmdline.c +++ b/tools/lvmcmdline.c @@ -60,7 +60,7 @@ static struct cmdline_context _cmdline; /* Command line args */ /* FIXME: Move static _the_args into cmd? */ -unsigned arg_count(const struct cmd_context *cmd __attribute((unused)), int a) +unsigned arg_count(const struct cmd_context *cmd __attribute__((unused)), int a) { return _the_args[a].count; } @@ -70,7 +70,7 @@ unsigned arg_is_set(const struct cmd_context *cmd, int a) return arg_count(cmd, a) ? 1 : 0; } -const char *arg_value(struct cmd_context *cmd __attribute((unused)), int a) +const char *arg_value(struct cmd_context *cmd __attribute__((unused)), int a) { return _the_args[a].value; } @@ -117,12 +117,12 @@ percent_t arg_percent_value(struct cmd_context *cmd, int a, const percent_t def) return arg_count(cmd, a) ? _the_args[a].percent : def; } -int arg_count_increment(struct cmd_context *cmd __attribute((unused)), int a) +int arg_count_increment(struct cmd_context *cmd __attribute__((unused)), int a) { return _the_args[a].count++; } -int yes_no_arg(struct cmd_context *cmd __attribute((unused)), struct arg *a) +int yes_no_arg(struct cmd_context *cmd __attribute__((unused)), struct arg *a) { a->sign = SIGN_NONE; a->percent = PERCENT_NONE; @@ -143,7 +143,7 @@ int yes_no_arg(struct cmd_context *cmd __attribute((unused)), struct arg *a) return 1; } -int yes_no_excl_arg(struct cmd_context *cmd __attribute((unused)), +int yes_no_excl_arg(struct cmd_context *cmd __attribute__((unused)), struct arg *a) { a->sign = SIGN_NONE; @@ -225,7 +225,7 @@ static int _get_int_arg(struct arg *a, char **ptr) } /* Size stored in sectors */ -static int _size_arg(struct cmd_context *cmd __attribute((unused)), struct arg *a, int factor) +static int _size_arg(struct cmd_context *cmd __attribute__((unused)), struct arg *a, int factor) { char *ptr; int i; @@ -307,7 +307,7 @@ int size_mb_arg(struct cmd_context *cmd, struct arg *a) return _size_arg(cmd, a, 2048); } -int int_arg(struct cmd_context *cmd __attribute((unused)), struct arg *a) +int int_arg(struct cmd_context *cmd __attribute__((unused)), struct arg *a) { char *ptr; @@ -317,7 +317,7 @@ int int_arg(struct cmd_context *cmd __attribute((unused)), struct arg *a) return 1; } -int int_arg_with_sign(struct cmd_context *cmd __attribute((unused)), struct arg *a) +int int_arg_with_sign(struct cmd_context *cmd __attribute__((unused)), struct arg *a) { char *ptr; @@ -327,7 +327,7 @@ int int_arg_with_sign(struct cmd_context *cmd __attribute((unused)), struct arg return 1; } -int int_arg_with_sign_and_percent(struct cmd_context *cmd __attribute((unused)), +int int_arg_with_sign_and_percent(struct cmd_context *cmd __attribute__((unused)), struct arg *a) { char *ptr; @@ -360,7 +360,7 @@ int int_arg_with_sign_and_percent(struct cmd_context *cmd __attribute((unused)), return 1; } -int minor_arg(struct cmd_context *cmd __attribute((unused)), struct arg *a) +int minor_arg(struct cmd_context *cmd __attribute__((unused)), struct arg *a) { char *ptr; @@ -375,7 +375,7 @@ int minor_arg(struct cmd_context *cmd __attribute((unused)), struct arg *a) return 1; } -int major_arg(struct cmd_context *cmd __attribute((unused)), struct arg *a) +int major_arg(struct cmd_context *cmd __attribute__((unused)), struct arg *a) { char *ptr; @@ -392,13 +392,13 @@ int major_arg(struct cmd_context *cmd __attribute((unused)), struct arg *a) return 1; } -int string_arg(struct cmd_context *cmd __attribute((unused)), - struct arg *a __attribute((unused))) +int string_arg(struct cmd_context *cmd __attribute__((unused)), + struct arg *a __attribute__((unused))) { return 1; } -int tag_arg(struct cmd_context *cmd __attribute((unused)), struct arg *a) +int tag_arg(struct cmd_context *cmd __attribute__((unused)), struct arg *a) { char *pos = a->value; @@ -413,7 +413,7 @@ int tag_arg(struct cmd_context *cmd __attribute((unused)), struct arg *a) return 1; } -int permission_arg(struct cmd_context *cmd __attribute((unused)), struct arg *a) +int permission_arg(struct cmd_context *cmd __attribute__((unused)), struct arg *a) { a->sign = SIGN_NONE; @@ -429,7 +429,7 @@ int permission_arg(struct cmd_context *cmd __attribute((unused)), struct arg *a) return 1; } -int alloc_arg(struct cmd_context *cmd __attribute((unused)), struct arg *a) +int alloc_arg(struct cmd_context *cmd __attribute__((unused)), struct arg *a) { alloc_policy_t alloc; @@ -452,7 +452,7 @@ int segtype_arg(struct cmd_context *cmd, struct arg *a) /* * Positive integer, zero or "auto". */ -int readahead_arg(struct cmd_context *cmd __attribute((unused)), struct arg *a) +int readahead_arg(struct cmd_context *cmd __attribute__((unused)), struct arg *a) { if (!strcasecmp(a->value, "auto")) { a->ui_value = DM_READ_AHEAD_AUTO; @@ -476,7 +476,7 @@ int readahead_arg(struct cmd_context *cmd __attribute((unused)), struct arg *a) /* * Non-zero, positive integer, "all", or "unmanaged" */ -int metadatacopies_arg(struct cmd_context *cmd __attribute((unused)), +int metadatacopies_arg(struct cmd_context *cmd __attribute__((unused)), struct arg *a) { if (!strncmp(cmd->command->name, "vg", 2)) { @@ -763,9 +763,9 @@ static int _merge_synonym(struct cmd_context *cmd, int oldarg, int newarg) return 1; } -int version(struct cmd_context *cmd __attribute((unused)), - int argc __attribute((unused)), - char **argv __attribute((unused))) +int version(struct cmd_context *cmd __attribute__((unused)), + int argc __attribute__((unused)), + char **argv __attribute__((unused))) { char vsn[80]; @@ -890,7 +890,7 @@ static void _display_help(void) } } -int help(struct cmd_context *cmd __attribute((unused)), int argc, char **argv) +int help(struct cmd_context *cmd __attribute__((unused)), int argc, char **argv) { int ret = ECMD_PROCESSED; diff --git a/tools/lvmdiskscan.c b/tools/lvmdiskscan.c index c91f5f2d6..9127c1561 100644 --- a/tools/lvmdiskscan.c +++ b/tools/lvmdiskscan.c @@ -91,8 +91,8 @@ static int _check_device(struct cmd_context *cmd, struct device *dev) return 1; } -int lvmdiskscan(struct cmd_context *cmd, int argc __attribute((unused)), - char **argv __attribute((unused))) +int lvmdiskscan(struct cmd_context *cmd, int argc __attribute__((unused)), + char **argv __attribute__((unused))) { uint64_t size; struct dev_iter *iter; diff --git a/tools/lvremove.c b/tools/lvremove.c index dbf2f1d9f..02521495f 100644 --- a/tools/lvremove.c +++ b/tools/lvremove.c @@ -16,7 +16,7 @@ #include "tools.h" static int lvremove_single(struct cmd_context *cmd, struct logical_volume *lv, - void *handle __attribute((unused))) + void *handle __attribute__((unused))) { struct logical_volume *origin; diff --git a/tools/lvscan.c b/tools/lvscan.c index a65bd1d32..c0522f09e 100644 --- a/tools/lvscan.c +++ b/tools/lvscan.c @@ -16,7 +16,7 @@ #include "tools.h" static int lvscan_single(struct cmd_context *cmd, struct logical_volume *lv, - void *handle __attribute((unused))) + void *handle __attribute__((unused))) { struct lvinfo info; int lv_total = 0; diff --git a/tools/polldaemon.c b/tools/polldaemon.c index 3c9fdb705..d51f4bb1c 100644 --- a/tools/polldaemon.c +++ b/tools/polldaemon.c @@ -19,7 +19,7 @@ #include #include -static void _sigchld_handler(int sig __attribute((unused))) +static void _sigchld_handler(int sig __attribute__((unused))) { while (wait4(-1, NULL, WNOHANG | WUNTRACED, NULL) > 0) ; } diff --git a/tools/pvchange.c b/tools/pvchange.c index a329d27a4..47b2a2717 100644 --- a/tools/pvchange.c +++ b/tools/pvchange.c @@ -19,7 +19,7 @@ static int _pvchange_single(struct cmd_context *cmd, struct volume_group *vg, struct physical_volume *pv, - void *handle __attribute((unused))) + void *handle __attribute__((unused))) { uint32_t orig_pe_alloc_count; /* FIXME Next three only required for format1. */ @@ -29,7 +29,7 @@ static int _pvchange_single(struct cmd_context *cmd, struct volume_group *vg, const char *pv_name = pv_dev_name(pv); const char *tag = NULL; const char *orig_vg_name; - char uuid[64] __attribute((aligned(8))); + char uuid[64] __attribute__((aligned(8))); int allocatable = 0; int tagarg = 0; diff --git a/tools/pvmove.c b/tools/pvmove.c index 2a3c27c6e..c8a480fdd 100644 --- a/tools/pvmove.c +++ b/tools/pvmove.c @@ -596,7 +596,7 @@ static int _finish_pvmove(struct cmd_context *cmd, struct volume_group *vg, static struct volume_group *_get_move_vg(struct cmd_context *cmd, const char *name, - const char *uuid __attribute((unused))) + const char *uuid __attribute__((unused))) { struct physical_volume *pv; diff --git a/tools/pvremove.c b/tools/pvremove.c index 34b721446..8242993cb 100644 --- a/tools/pvremove.c +++ b/tools/pvremove.c @@ -90,7 +90,7 @@ static int pvremove_check(struct cmd_context *cmd, const char *name) } static int pvremove_single(struct cmd_context *cmd, const char *pv_name, - void *handle __attribute((unused))) + void *handle __attribute__((unused))) { struct device *dev; int ret = ECMD_FAILED; diff --git a/tools/pvscan.c b/tools/pvscan.c index 57882f67c..b24b7ab51 100644 --- a/tools/pvscan.c +++ b/tools/pvscan.c @@ -20,9 +20,9 @@ int vg_max_name_len = 0; static void _pvscan_display_single(struct cmd_context *cmd, struct physical_volume *pv, - void *handle __attribute((unused))) + void *handle __attribute__((unused))) { - char uuid[64] __attribute((aligned(8))); + char uuid[64] __attribute__((aligned(8))); unsigned vg_name_len = 0; char pv_tmp_name[NAME_LEN] = { 0, }; @@ -96,8 +96,8 @@ static void _pvscan_display_single(struct cmd_context *cmd, pv_pe_size(pv))); } -int pvscan(struct cmd_context *cmd, int argc __attribute((unused)), - char **argv __attribute((unused))) +int pvscan(struct cmd_context *cmd, int argc __attribute__((unused)), + char **argv __attribute__((unused))) { int new_pvs_found = 0; int pvs_found = 0; diff --git a/tools/reporter.c b/tools/reporter.c index 32804f678..f39d23f82 100644 --- a/tools/reporter.c +++ b/tools/reporter.c @@ -16,7 +16,7 @@ #include "tools.h" #include "report.h" -static int _vgs_single(struct cmd_context *cmd __attribute((unused)), +static int _vgs_single(struct cmd_context *cmd __attribute__((unused)), const char *vg_name, struct volume_group *vg, void *handle) { @@ -41,7 +41,7 @@ static int _lvs_single(struct cmd_context *cmd, struct logical_volume *lv, return ECMD_PROCESSED; } -static int _segs_single(struct cmd_context *cmd __attribute((unused)), +static int _segs_single(struct cmd_context *cmd __attribute__((unused)), struct lv_segment *seg, void *handle) { if (!report_object(handle, seg->lv->vg, seg->lv, NULL, seg, NULL)) { @@ -133,7 +133,7 @@ static int _pvs_single(struct cmd_context *cmd, struct volume_group *vg, int ret = ECMD_PROCESSED; const char *vg_name = NULL; struct volume_group *old_vg = vg; - char uuid[64] __attribute((aligned(8))); + char uuid[64] __attribute__((aligned(8))); if (is_pv(pv) && !is_orphan(pv) && !vg) { vg_name = pv_vg_name(pv); diff --git a/tools/segtypes.c b/tools/segtypes.c index 504dcc1f2..a5f55a86f 100644 --- a/tools/segtypes.c +++ b/tools/segtypes.c @@ -15,8 +15,8 @@ #include "tools.h" -int segtypes(struct cmd_context *cmd, int argc __attribute((unused)), - char **argv __attribute((unused))) +int segtypes(struct cmd_context *cmd, int argc __attribute__((unused)), + char **argv __attribute__((unused))) { display_segtypes(cmd); diff --git a/tools/stub.h b/tools/stub.h index 1523797ce..478de5de9 100644 --- a/tools/stub.h +++ b/tools/stub.h @@ -17,23 +17,23 @@ log_error("Command not implemented yet."); return ECMD_FAILED /*int e2fsadm(struct cmd_context *cmd, int argc, char **argv) unimplemented*/ -int lvmsadc(struct cmd_context *cmd __attribute((unused)), - int argc __attribute((unused)), - char **argv __attribute((unused))) +int lvmsadc(struct cmd_context *cmd __attribute__((unused)), + int argc __attribute__((unused)), + char **argv __attribute__((unused))) { unimplemented; } -int lvmsar(struct cmd_context *cmd __attribute((unused)), - int argc __attribute((unused)), - char **argv __attribute((unused))) +int lvmsar(struct cmd_context *cmd __attribute__((unused)), + int argc __attribute__((unused)), + char **argv __attribute__((unused))) { unimplemented; } -int pvdata(struct cmd_context *cmd __attribute((unused)), - int argc __attribute((unused)), - char **argv __attribute((unused))) +int pvdata(struct cmd_context *cmd __attribute__((unused)), + int argc __attribute__((unused)), + char **argv __attribute__((unused))) { log_error("There's no 'pvdata' command in LVM2."); log_error("Use lvs, pvs, vgs instead; or use vgcfgbackup and read the text file backup."); diff --git a/tools/tools.h b/tools/tools.h index 2e06fc201..e9bc85023 100644 --- a/tools/tools.h +++ b/tools/tools.h @@ -152,7 +152,7 @@ int units_arg(struct cmd_context *cmd, struct arg *a); int segtype_arg(struct cmd_context *cmd, struct arg *a); int alloc_arg(struct cmd_context *cmd, struct arg *a); int readahead_arg(struct cmd_context *cmd, struct arg *a); -int metadatacopies_arg(struct cmd_context *cmd __attribute((unused)), struct arg *a); +int metadatacopies_arg(struct cmd_context *cmd __attribute__((unused)), struct arg *a); /* we use the enums to access the switches */ unsigned arg_count(const struct cmd_context *cmd, int a); diff --git a/tools/vgchange.c b/tools/vgchange.c index ed5a7ef06..6758c0517 100644 --- a/tools/vgchange.c +++ b/tools/vgchange.c @@ -476,7 +476,7 @@ static int _vgchange_tag(struct cmd_context *cmd, struct volume_group *vg, return ECMD_PROCESSED; } -static int _vgchange_uuid(struct cmd_context *cmd __attribute((unused)), +static int _vgchange_uuid(struct cmd_context *cmd __attribute__((unused)), struct volume_group *vg) { struct lv_list *lvl; @@ -564,7 +564,7 @@ static int _vgchange_metadata_copies(struct cmd_context *cmd, static int vgchange_single(struct cmd_context *cmd, const char *vg_name, struct volume_group *vg, - void *handle __attribute((unused))) + void *handle __attribute__((unused))) { int dmeventd_mode, r = ECMD_FAILED; diff --git a/tools/vgck.c b/tools/vgck.c index c8cad45b9..d9613b57a 100644 --- a/tools/vgck.c +++ b/tools/vgck.c @@ -16,10 +16,10 @@ #include "tools.h" #include "metadata.h" -static int vgck_single(struct cmd_context *cmd __attribute((unused)), +static int vgck_single(struct cmd_context *cmd __attribute__((unused)), const char *vg_name, struct volume_group *vg, - void *handle __attribute((unused))) + void *handle __attribute__((unused))) { if (!vg_check_status(vg, EXPORTED_VG)) { stack; diff --git a/tools/vgconvert.c b/tools/vgconvert.c index 1808454a4..d24556b87 100644 --- a/tools/vgconvert.c +++ b/tools/vgconvert.c @@ -17,7 +17,7 @@ static int vgconvert_single(struct cmd_context *cmd, const char *vg_name, struct volume_group *vg, - void *handle __attribute((unused))) + void *handle __attribute__((unused))) { struct physical_volume *pv, *existing_pv; struct logical_volume *lv; diff --git a/tools/vgdisplay.c b/tools/vgdisplay.c index 954e456b9..afc92fe74 100644 --- a/tools/vgdisplay.c +++ b/tools/vgdisplay.c @@ -17,7 +17,7 @@ static int vgdisplay_single(struct cmd_context *cmd, const char *vg_name, struct volume_group *vg, - void *handle __attribute((unused))) + void *handle __attribute__((unused))) { /* FIXME Do the active check here if activevolumegroups_ARG ? */ vg_check_status(vg, EXPORTED_VG); diff --git a/tools/vgexport.c b/tools/vgexport.c index df7f23771..a1043d251 100644 --- a/tools/vgexport.c +++ b/tools/vgexport.c @@ -15,10 +15,10 @@ #include "tools.h" -static int vgexport_single(struct cmd_context *cmd __attribute((unused)), +static int vgexport_single(struct cmd_context *cmd __attribute__((unused)), const char *vg_name, struct volume_group *vg, - void *handle __attribute((unused))) + void *handle __attribute__((unused))) { struct pv_list *pvl; struct physical_volume *pv; diff --git a/tools/vgimport.c b/tools/vgimport.c index ee8e40a3d..284f53617 100644 --- a/tools/vgimport.c +++ b/tools/vgimport.c @@ -15,10 +15,10 @@ #include "tools.h" -static int vgimport_single(struct cmd_context *cmd __attribute((unused)), +static int vgimport_single(struct cmd_context *cmd __attribute__((unused)), const char *vg_name, struct volume_group *vg, - void *handle __attribute((unused))) + void *handle __attribute__((unused))) { struct pv_list *pvl; struct physical_volume *pv; diff --git a/tools/vgmerge.c b/tools/vgmerge.c index 6dba99bbf..403a5e040 100644 --- a/tools/vgmerge.c +++ b/tools/vgmerge.c @@ -92,7 +92,7 @@ static int _vgmerge_single(struct cmd_context *cmd, const char *vg_name_to, /* Fix up LVIDs */ dm_list_iterate_items(lvl1, &vg_to->lvs) { union lvid *lvid1 = &lvl1->lv->lvid; - char uuid[64] __attribute((aligned(8))); + char uuid[64] __attribute__((aligned(8))); dm_list_iterate_items(lvl2, &vg_from->lvs) { union lvid *lvid2 = &lvl2->lv->lvid; diff --git a/tools/vgmknodes.c b/tools/vgmknodes.c index f62b58934..0fd273f73 100644 --- a/tools/vgmknodes.c +++ b/tools/vgmknodes.c @@ -16,7 +16,7 @@ #include "tools.h" static int _vgmknodes_single(struct cmd_context *cmd, struct logical_volume *lv, - void *handle __attribute((unused))) + void *handle __attribute__((unused))) { if (arg_count(cmd, refresh_ARG) && lv_is_visible(lv)) if (!lv_refresh(cmd, lv)) { diff --git a/tools/vgreduce.c b/tools/vgreduce.c index 0cbe4b04a..83994ccbf 100644 --- a/tools/vgreduce.c +++ b/tools/vgreduce.c @@ -18,7 +18,7 @@ static int _remove_pv(struct volume_group *vg, struct pv_list *pvl, int silent) { - char uuid[64] __attribute((aligned(8))); + char uuid[64] __attribute__((aligned(8))); if (vg->pv_count == 1) { log_error("Volume Groups must always contain at least one PV"); @@ -376,7 +376,7 @@ static int _make_vg_consistent(struct cmd_context *cmd, struct volume_group *vg) /* Or take pv_name instead? */ static int _vgreduce_single(struct cmd_context *cmd, struct volume_group *vg, struct physical_volume *pv, - void *handle __attribute((unused))) + void *handle __attribute__((unused))) { struct pv_list *pvl; struct volume_group *orphan_vg = NULL; diff --git a/tools/vgremove.c b/tools/vgremove.c index ce0334754..67e3767b4 100644 --- a/tools/vgremove.c +++ b/tools/vgremove.c @@ -17,7 +17,7 @@ static int vgremove_single(struct cmd_context *cmd, const char *vg_name, struct volume_group *vg, - void *handle __attribute((unused))) + void *handle __attribute__((unused))) { unsigned lv_count, missing; force_t force; diff --git a/tools/vgscan.c b/tools/vgscan.c index b8971adc1..4e12914c6 100644 --- a/tools/vgscan.c +++ b/tools/vgscan.c @@ -17,7 +17,7 @@ static int vgscan_single(struct cmd_context *cmd, const char *vg_name, struct volume_group *vg, - void *handle __attribute((unused))) + void *handle __attribute__((unused))) { log_print("Found %svolume group \"%s\" using metadata type %s", vg_is_exported(vg) ? "exported " : "", vg_name,