mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alexander Gordeev <lasaine@lvk.cs.msu.su>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: john stultz <johnstul@us.ibm.com>,
	Rodolfo Giometti <giometti@linux.it>,
	lkml <linux-kernel@vger.kernel.org>,
	Alexander Gordeev <lasaine@lvk.cs.msu.su>
Subject: [PATCH 1/2] pps: initialize ts_real properly
Date: Fri, 25 Feb 2011 17:11:55 +0300	[thread overview]
Message-ID: <1298643116-3488-2-git-send-email-lasaine@lvk.cs.msu.su> (raw)
In-Reply-To: <20110208153129.0f7fe5d3.akpm@linux-foundation.org>

Initialize ts_real.flags to fix compiler warning about possible
uninitialized use of this field.

Signed-off-by: Alexander Gordeev <lasaine@lvk.cs.msu.su>
---
 drivers/pps/kapi.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/pps/kapi.c b/drivers/pps/kapi.c
index cba1b43..a4e8eb9 100644
--- a/drivers/pps/kapi.c
+++ b/drivers/pps/kapi.c
@@ -168,7 +168,7 @@ void pps_event(struct pps_device *pps, struct pps_event_time *ts, int event,
 {
 	unsigned long flags;
 	int captured = 0;
-	struct pps_ktime ts_real;
+	struct pps_ktime ts_real = { .sec = 0, .nsec = 0, .flags = 0 };
 
 	/* check event type */
 	BUG_ON((event & (PPS_CAPTUREASSERT | PPS_CAPTURECLEAR)) == 0);
-- 
1.7.2.3


  parent reply	other threads:[~2011-02-25 14:12 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-02  1:31 PPS build warning john stultz
2011-02-08 23:31 ` Andrew Morton
2011-02-25 14:11   ` [PATCH 0/2] fix two minor PPS issues Alexander Gordeev
2011-02-25 14:11   ` Alexander Gordeev [this message]
2011-02-25 14:11   ` [PATCH 2/2] pps: remove unreachable code Alexander Gordeev

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=1298643116-3488-2-git-send-email-lasaine@lvk.cs.msu.su \
    --to=lasaine@lvk.cs.msu.su \
    --cc=akpm@linux-foundation.org \
    --cc=giometti@linux.it \
    --cc=johnstul@us.ibm.com \
    --cc=linux-kernel@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

all inboxes | Powered by JetHome®