From: Kent Overstreet <kmo@daterainc.com>
To: Jens Axboe <axboe@kernel.dk>
Cc: Olof Johansson <olof@lixom.net>,
Stephen Rothwell <sfr@canb.auug.org.au>,
"linux-next@vger.kernel.org" <linux-next@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: [PATCH] block: Silence spurious compiler warnings
Date: Tue, 26 Nov 2013 16:39:49 -0800 [thread overview]
Message-ID: <20131127003949.GA21305@kmo> (raw)
In-Reply-To: <5294F030.5090805@kernel.dk>
>From 46e7081430f5f483906f496733a23f8e9d898879 Mon Sep 17 00:00:00 2001
From: Kent Overstreet <kmo@daterainc.com>
Date: Tue, 26 Nov 2013 16:36:49 -0800
Subject: [PATCH] block: Silence spurious compiler warnings
Signed-off-by: Kent Overstreet <kmo@daterainc.com>
---
On Tue, Nov 26, 2013 at 12:02:08PM -0700, Jens Axboe wrote:
> On 11/26/2013 12:01 PM, Olof Johansson wrote:
> > I just noticed that i see this with gcc 4.7.0, but 4.8.1 does not warn.
>
> That's good, because it's not a bug. But arguably we should shut up 4.7
> as well, however...
Here you go:
block/blk-merge.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/block/blk-merge.c b/block/blk-merge.c
index 05c17be..0b097f6 100644
--- a/block/blk-merge.c
+++ b/block/blk-merge.c
@@ -89,6 +89,8 @@ static int blk_phys_contig_segment(struct request_queue *q, struct bio *bio,
struct bio_vec end_bv, nxt_bv;
struct bvec_iter iter;
+ uninitialized_var(end_bv);
+
if (!blk_queue_cluster(q))
return 0;
@@ -173,6 +175,8 @@ int blk_rq_map_sg(struct request_queue *q, struct request *rq,
struct scatterlist *sg;
int nsegs, cluster;
+ uninitialized_var(bvprv);
+
nsegs = 0;
cluster = blk_queue_cluster(q);
@@ -235,6 +239,8 @@ int blk_bio_map_sg(struct request_queue *q, struct bio *bio,
int nsegs, cluster;
struct bvec_iter iter;
+ uninitialized_var(bvprv);
+
nsegs = 0;
cluster = blk_queue_cluster(q);
--
1.8.4.4
next prev parent reply other threads:[~2013-11-27 0:39 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-26 2:29 linux-next: build warnings after merge of the block tree Stephen Rothwell
2013-11-26 3:35 ` Stephen Rothwell
2013-11-26 19:01 ` Olof Johansson
2013-11-26 19:02 ` Jens Axboe
2013-11-27 0:39 ` Kent Overstreet [this message]
2013-11-28 0:50 ` [PATCH] block: Silence spurious compiler warnings Stephen Rothwell
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=20131127003949.GA21305@kmo \
--to=kmo@daterainc.com \
--cc=axboe@kernel.dk \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=olof@lixom.net \
--cc=sfr@canb.auug.org.au \
/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).