From 9278655de141a3021ae5e22fbb2a9ad44b5ab464 Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Wed, 8 Feb 2012 12:57:15 +0000 Subject: [PATCH] Some fixmes 'len' calculation is unused ? Unreachable code could be removed or moved upward ? --- WHATS_NEW | 4 ++-- lib/cache/lvmcache.c | 1 + lib/misc/lvm-string.c | 5 +++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/WHATS_NEW b/WHATS_NEW index aa0ce4d06..ae945386d 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -1,7 +1,7 @@ Version 2.02.91 - =================================== - Switch int to void return for str_list_del() - Fix error path handling in _build_desc() + Switch int to void return for str_list_del(). + Fix error path handling in _build_desc(). Add range test for device number in _scan_proc_dev(). Use signed long for sysconf() call in cmirrord. Do not write in front of log buffer in print_log(). diff --git a/lib/cache/lvmcache.c b/lib/cache/lvmcache.c index 3d9c152ea..a804d53ab 100644 --- a/lib/cache/lvmcache.c +++ b/lib/cache/lvmcache.c @@ -987,6 +987,7 @@ static int _lvmcache_update_vgid(struct lvmcache_info *info, if (vginfo && *vginfo->vgid) dm_hash_remove(_vgid_hash, vginfo->vgid); if (!vgid) { + /* FIXME: unreachable code path */ log_debug("lvmcache: %s: clearing VGID", info ? dev_name(info->dev) : vginfo->vgname); return 1; } diff --git a/lib/misc/lvm-string.c b/lib/misc/lvm-string.c index 6932e2351..7e4bbdd23 100644 --- a/lib/misc/lvm-string.c +++ b/lib/misc/lvm-string.c @@ -49,12 +49,13 @@ int emit_to_buffer(char **buffer, size_t *size, const char *fmt, ...) int validate_tag(const char *n) { register char c; - register int len = 0; + /* int len = 0; */ if (!n || !*n) return 0; - while ((len++, c = *n++)) + /* FIXME: Is unlimited tag size support needed ? */ + while ((/* len++, */ c = *n++)) if (!isalnum(c) && c != '.' && c != '_' && c != '-' && c != '+' && c != '/' && c != '=' && c != '!' && c != ':' && c != '&' && c != '#') return 0;