From: Jeff Mahoney <jeffm@suse.com>
To: linux-btrfs <linux-btrfs@vger.kernel.org>,
Josef Bacik <jbacik@fusionio.com>
Cc: Kees Cook <keescook@chromium.org>, Fengguang Wu <fengguang.wu@intel.com>
Subject: [PATCH] btrfs: fix static checker warnings
Date: Wed, 20 Nov 2013 16:50:23 -0500 [thread overview]
Message-ID: <528D2E9F.6070101@suse.com> (raw)
This patch fixes the following warnings:
fs/btrfs/extent-tree.c:6201:12: sparse: symbol 'get_raid_name' was not declared. Should it be static?
fs/btrfs/extent-tree.c:8430:9: error: format not a string literal and no format arguments [-Werror=format-security] get_raid_name(index));
Signed-off-by: Jeff Mahoney <jeffm@suse.com>
---
fs/btrfs/extent-tree.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/fs/btrfs/extent-tree.c 2013-11-20 12:21:23.969683074 -0500
+++ b/fs/btrfs/extent-tree.c 2013-11-20 14:43:34.494306159 -0500
@@ -6119,7 +6119,7 @@ static const char *btrfs_raid_type_names
[BTRFS_RAID_RAID6] = "raid6",
};
-const char *get_raid_name(enum btrfs_raid_types type)
+static const char *get_raid_name(enum btrfs_raid_types type)
{
if (type >= BTRFS_NR_RAID_TYPES)
return NULL;
@@ -8328,7 +8328,7 @@ static void __link_block_group(struct bt
kobject_get(&space_info->kobj); /* put in release */
ret = kobject_init_and_add(kobj, &btrfs_raid_ktype,
- &space_info->kobj,
+ &space_info->kobj, "%s",
get_raid_name(index));
if (ret) {
pr_warn("btrfs: failed to add kobject for block cache. ignoring.\n");
--
Jeff Mahoney
SUSE Labs
next reply other threads:[~2013-11-20 21:51 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-20 21:50 Jeff Mahoney [this message]
2013-11-20 22:16 ` [PATCH] btrfs: fix static checker warnings Kees Cook
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=528D2E9F.6070101@suse.com \
--to=jeffm@suse.com \
--cc=fengguang.wu@intel.com \
--cc=jbacik@fusionio.com \
--cc=keescook@chromium.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.