From: Xose Vazquez Perez <xose.vazquez@gmail.com>
To: device-mapper development <dm-devel@redhat.com>,
Christophe Varoqui <christophe.varoqui@opensvc.com>,
Hannes Reinecke <hare@suse.de>,
Benjamin Marzinski <bmarzins@redhat.com>,
ShivaKrishna Merla <shivakrishna.merla@netapp.com>
Subject: multipath-tools: [cppcheck] static code analysis
Date: Thu, 21 Jul 2016 14:40:46 +0200 [thread overview]
Message-ID: <55e832d0-f8ed-9cbc-1ca5-593c94f343bb@gmail.com> (raw)
ShivaKrishna, could you please check the first two errors(Division by zero).
That code was added in a28e61e5
[libmultipath/configure.c:179]: (error) Division by zero.
[libmultipath/configure.c:197]: (error) Division by zero.
[libmultipath/print.c:800]: (error) Expression 'while((int)(c-s)<(data.width)&&(c<(line+len-1)))*c++' depends on order of evaluation of side effects
[libmultipath/print.c:835]: (error) Expression 'while((int)(c-s)<(data.width)&&(c<(line+len-1)))*c++' depends on order of evaluation of side effects
[libmultipath/print.c:867]: (error) Expression 'while((int)(c-s)<(data.width)&&(c<(line+len-1)))*c++' depends on order of evaluation of side effects
[libmultipath/print.c:902]: (error) Expression 'while((int)(c-s)<(data.width)&&(c<(line+len-1)))*c++' depends on order of evaluation of side effects
[libmultipath/print.c:936]: (error) Expression 'while((int)(c-s)<(data.width)&&(c<(line+len-1)))*c++' depends on order of evaluation of side effects
[libmpathcmd/mpath_cmd.h:24]: (error) Invalid number of character '{' when these macros are defined: '__cpluscplus'.
[kpartx/kpartx.c:70]: (portability) Assigning an integer to a pointer is not portable.
[libmultipath/log.c:58]: (portability) 'la.start' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined.
[libmultipath/log.c:119]: (portability) 'la.tail' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined.
[libmultipath/devmapper.c:1050]: (portability) '(void*)names' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined.
[libmultipath/devmapper.c:1200]: (portability) '(void*)names' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined.
[libmultipath/devmapper.c:891]: (portability) '(void*)names' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined.
[libmultipath/devmapper.c:162]: (portability) '(void*)target' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined.
[libmultipath/alias.c:54] -> [libmultipath/alias.c:55]: (performance) Buffer 'name' is being written before its old content has been used.
[0] http://cppcheck.sf.net/
reply other threads:[~2016-07-21 12:40 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=55e832d0-f8ed-9cbc-1ca5-593c94f343bb@gmail.com \
--to=xose.vazquez@gmail.com \
--cc=bmarzins@redhat.com \
--cc=christophe.varoqui@opensvc.com \
--cc=dm-devel@redhat.com \
--cc=hare@suse.de \
--cc=shivakrishna.merla@netapp.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).