stable-2.02 - gcc: use apropriate type for reading and printing values
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=55a8b1bd37aefb6835d41118cf94f429e7d20519 Commit: 55a8b1bd37aefb6835d41118cf94f429e7d20519 Parent: d48266b7fba54f7d57f233f51e9f084fbff69956 Author: Zdenek Kabelac <[email protected]> AuthorDate: Fri Aug 28 19:35:25 2020 +0200 Committer: Zdenek Kabelac <[email protected]> CommitterDate: Fri Oct 16 16:02:05 2020 +0200
gcc: use apropriate type for reading and printing values
--- lib/label/label.c | 2 +- lib/metadata/vg.c | 4 ++-- lib/mm/memlock.c | 2 +- libdm/ioctl/libdm-iface.c | 2 +- libdm/libdm-common.c | 2 +- libdm/libdm-stats.c | 2 +- libdm/mm/pool.c | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-)
lib/label/label.c +1 -1
@@ -689,7 +689,7 @@ static int _scan_list(struct cmd_context *cmd, struct dev_filter *f,dev_name (devl->dev), (int )MAJOR (devl->dev->dev), (int )MINOR (devl->dev->dev), - devl->dev->bcache_fd, bb); + devl->dev->bcache_fd, (void *)bb); ret =_process_block (cmd, f, devl->dev, bb,0 ,0 , &is_lvm_device);
lib/metadata/vg.c +2 -2
@@ -64,7 +64,7 @@ struct volume_group *alloc_vg(const char *pool_name, struct cmd_context *cmd,dm_list_init (&vg->removed_historical_lvs);dm_list_init (&vg->removed_pvs); -log_debug_mem ("Allocated VG %s at %p." , vg->name ? :"<no name>" , vg); +log_debug_mem ("Allocated VG %s at %p." , vg->name ? :"<no name>" , (void *)vg);return vg; }
@@ -79,7 +79,7 @@ static void _free_vg(struct volume_group *vg)return ; } -log_debug_mem ("Freeing VG %s at %p." , vg->name ? :"<no name>" , vg); +log_debug_mem ("Freeing VG %s at %p." , vg->name ? :"<no name>" , (void *)vg);dm_hash_destroy (vg->hostnames);dm_pool_destroy (vg->vgmem);
lib/mm/memlock.c +1 -1
@@ -232,7 +232,7 @@ static int _maps_line(const struct dm_config_node *cn, lvmlock_t lock, const char *line, size_t *mstats) { const struct dm_config_value *cv; -long from, to; +unsigned long from, to;int pos;unsigned i;char fr, fw, fx, fp;
libdm/ioctl/libdm-iface.c +1 -1
@@ -204,7 +204,7 @@ static int _get_proc_number(const char *file, const char *name, }while (getline (&line, &len, fl) !=-1 ) { -if (sscanf (line,"%d %255s\n" , &num, &nm[0 ]) ==2 ) { +if (sscanf (line,"%u %255s\n" , &num, &nm[0 ]) ==2 ) {if (!strcmp (name, nm)) {if (number) { *number = num;
libdm/libdm-common.c +1 -1
@@ -510,7 +510,7 @@ int unmangle_string(const char *str, const char *str_name, size_t len,int strict = mode !=DM_STRING_MANGLING_NONE ;char str_rest[DM_NAME_LEN ];size_t i, j; -int code; +unsigned int code;int r =0 ;if (!str || !buf)
libdm/libdm-stats.c +1 -1
@@ -403,7 +403,7 @@ static int _stats_bound(const struct dm_stats *dms)if (dms->bind_major >0 || dms->bind_name || dms->bind_uuid)return 1 ;/* %p format specifier expects a void pointer. */ -log_error ("Stats handle at %p is not bound." , dms); +log_error ("Stats handle at %p is not bound." , (const void *)dms);return 0 ; }
libdm/mm/pool.c +1 -1
@@ -96,7 +96,7 @@ void dm_pools_check_leaks(void) p->orig_pool, p->name, p->stats.bytes);#else -log_error (" [%p] %s" , p, p->name); +log_error (" [%p] %s" , (void *)p, p->name);#endif }pthread_mutex_unlock (&_dm_pools_mutex);