From: Chris Samuel <chris@csamuel.org>
To: linux-btrfs@vger.kernel.org, Chris Mason <chris.mason@oracle.com>
Subject: cppcheck and btrfs
Date: Tue, 15 Mar 2011 07:32:13 +1100 [thread overview]
Message-ID: <201103150732.18300.chris@csamuel.org> (raw)
[-- Attachment #1: Type: text/plain, Size: 1354 bytes --]
Hi Chris, et. al,
I've recently come across cppcheck (static analyser for C code)
and ran it on the current btrfs directory from Linus's repo and
it's reported the following potential issues:
linux-2.6$ cppcheck -q fs/btrfs/
[fs/btrfs/compression.c:343]: (error) Data is allocated but not initialized:
cb
[fs/btrfs/compression.c:583]: (error) Data is allocated but not initialized:
cb
[fs/btrfs/delayed-ref.c:649]: (error) Data is allocated but not initialized:
ref
[fs/btrfs/delayed-ref.c:694]: (error) Data is allocated but not initialized:
ref
[fs/btrfs/extent-tree.c:5766]: (error) Data is allocated but not initialized:
extent_op
[fs/btrfs/extent-tree.c:5768]: (error) Data is allocated but not initialized:
extent_op
[fs/btrfs/transaction.c:1161]: (error) Data is allocated but not initialized:
ac
[fs/btrfs/volumes.c:1387]: (error) Possible null pointer dereference:
fs_devices
[fs/btrfs/volumes.c:3636]: (error) Memory leak: device
Now I'm not really a programmer (much less a kernel one) but I
do see people using it discover issues in kernel code.
Are these issues real or bugs in cppcheck ?
cheers!
Chris
--
Chris Samuel : http://www.csamuel.org/ : Melbourne, VIC
This email may come with a PGP signature as a file. Do not panic.
For more info see: http://en.wikipedia.org/wiki/OpenPGP
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 482 bytes --]
next reply other threads:[~2011-03-14 20:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-14 20:32 Chris Samuel [this message]
2011-03-14 22:24 ` cppcheck and btrfs Ilya Dryomov
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=201103150732.18300.chris@csamuel.org \
--to=chris@csamuel.org \
--cc=chris.mason@oracle.com \
--cc=linux-btrfs@vger.kernel.org \
/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).