public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Borislav Petkov <bp@alien8.de>
To: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Cc: lkml <linux-kernel@vger.kernel.org>
Subject: ipc/shm.c:494:18: warning: unused variable ‘hs’ [-Wunused-variable]
Date: Wed, 8 May 2013 16:34:11 +0200	[thread overview]
Message-ID: <20130508143411.GD30955@pd.tnic> (raw)

Hi,

looks like this warning came in with
af73e4d9506d3b797509f3c030e7dcd554f7d9c4 and fires in the

# CONFIG_HUGETLB_PAGE is not set

case because

	struct hstate *hs = hstate_sizelog((shmflg >> SHM_HUGE_SHIFT)
                                        & SHM_HUGE_MASK);

becomes

	struct hstate *hs = ((void *)0)

due to

#define hstate_sizelog(s) NULL

Hmmm, I don't have a quick solution off the top of my head from staring
at the code.

-- 
Regards/Gruss,
    Boris.

Sent from a fat crate under my desk. Formatting is fine.
--

             reply	other threads:[~2013-05-08 14:33 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-08 14:34 Borislav Petkov [this message]
2013-05-08 16:12 ` ipc/shm.c:494:18: warning: unused variable ‘hs’ [-Wunused-variable] Naoya Horiguchi
2013-05-08 18:45   ` Borislav Petkov
2013-05-08 20:48     ` [PATCH] ipc/shm.c: don't use auto variable hs in newseg() Naoya Horiguchi
2013-05-17 20:31       ` KOSAKI Motohiro
2013-05-18  1:46         ` Naoya Horiguchi

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=20130508143411.GD30955@pd.tnic \
    --to=bp@alien8.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=n-horiguchi@ah.jp.nec.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