staging/lustre: fix 'code maintainability' errors
authorSebastien Buisson <sebastien.buisson@bull.net>
Mon, 22 Jul 2013 16:06:43 +0000 (00:06 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 23 Jul 2013 20:35:49 +0000 (13:35 -0700)
Fix 'code maintainability' issues found by Coverity version 6.5.1:
Unused pointer value (UNUSED_VALUE)
Pointer returned by function is never used.
Missing varargs init or cleanup (VARARGS)
va_end was not called for variable.

Signed-off-by: Sebastien Buisson <sebastien.buisson@bull.net>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3107
Lustre-change: http://review.whamcloud.com/5944
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: John Hammond <johnlockwoodhammond@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Peng Tao <tao.peng@emc.com>
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/obdclass/lprocfs_jobstats.c
drivers/staging/lustre/lustre/ptlrpc/pack_generic.c

index e2d57fef0da3bf6dc66c90ef20631725b6248caf..7f6072c4b7f8875e513dfe6c2c0be3c5f692a7ed 100644 (file)
@@ -366,7 +366,6 @@ static int lprocfs_jobstats_seq_show(struct seq_file *p, void *v)
        struct job_stat                 *job = v;
        struct lprocfs_stats            *s;
        struct lprocfs_counter          ret;
-       struct lprocfs_counter          *cntr;
        struct lprocfs_counter_header   *cntr_header;
        int                             i;
 
@@ -380,7 +379,6 @@ static int lprocfs_jobstats_seq_show(struct seq_file *p, void *v)
 
        s = job->js_stats;
        for (i = 0; i < s->ls_num; i++) {
-               cntr = lprocfs_stats_counter_get(s, 0, i);
                cntr_header = &s->ls_cnt_header[i];
                lprocfs_stats_collect(s, i, &ret);
 
index be246d491886f61bec808b6ca0a8fcfda55971c3..ffff64833557453e5d70cc1c4584ef67eff10e92 100644 (file)
@@ -2462,6 +2462,7 @@ void _debug_req(struct ptlrpc_request *req,
                           rep_ok ? lustre_msg_get_flags(req->rq_repmsg) : -1,
                           req->rq_status,
                           rep_ok ? lustre_msg_get_status(req->rq_repmsg) : -1);
+       va_end(args);
 }
 EXPORT_SYMBOL(_debug_req);