From 9f247795f368dcefccd817dbd7925f3be14a9397 Mon Sep 17 00:00:00 2001 From: Jens Remus Date: Tue, 5 Sep 2017 20:53:27 +0200 Subject: [PATCH] cmsfs-fuse: remove unused variable in add_record_ext() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Resolves Cppcheck style warning: [cmsfs-fuse/cmsfs-fuse.c:936]: (style) Variable 'i' is modified but its new value is never used. Cc: Gerald Schaefer Signed-off-by: Jens Remus Reviewed-by: Jan Höppner Signed-off-by: Jan Höppner --- cmsfs-fuse/cmsfs-fuse.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/cmsfs-fuse/cmsfs-fuse.c b/cmsfs-fuse/cmsfs-fuse.c index f199c1df..3b501f8e 100644 --- a/cmsfs-fuse/cmsfs-fuse.c +++ b/cmsfs-fuse/cmsfs-fuse.c @@ -923,7 +923,6 @@ static void set_record(struct file *f, int *record, off_t addr, int len, static void add_record_ext(struct record *rec, struct record_ext *ext) { struct record_ext *tmp; - int i = 0; if (rec->ext == NULL) { rec->ext = ext; @@ -931,9 +930,7 @@ static void add_record_ext(struct record *rec, struct record_ext *ext) ext->next = NULL; } else { tmp = rec->ext; - i++; while (tmp->next != NULL) { - i++; tmp = tmp->next; } tmp->next = ext;