linux-sh.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: "Eric W. Biederman" <ebiederm@xmission.com>,
	Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Rich Felker <dalias@libc.org>,
	Linux-Arch <linux-arch@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Yoshinori Sato <ysato@users.sourceforge.jp>,
	Linux-sh list <linux-sh@vger.kernel.org>
Subject: Re: [PATCH] signal/sh: Stop gcc warning about an impossible case in do_divide_error
Date: Wed, 30 May 2018 07:54:57 +0000	[thread overview]
Message-ID: <8a890c7c-771a-2f10-6dc1-145a9f75e48a@cogentembedded.com> (raw)
In-Reply-To: <87h8mqo6at.fsf_-_@xmission.com>

Hello!

On 5/29/2018 6:00 PM, Eric W. Biederman wrote:

> Geert Uytterhoeven <geert@linux-m68k.org> reported:
>>    HOSTLD  scripts/mod/modpost
>>    CC      arch/sh/kernel/traps_32.o
>> arch/sh/kernel/traps_32.c: In function 'do_divide_error':
>> arch/sh/kernel/traps_32.c:606:17: error: 'code' may be used uninitialized in this function [-Werror=uninitialized]
>> cc1: all warnings being treated as errors
> 
> It is clear from inspection that do_divide_error is only called with
> TRAP_DIVZERO_ERROR or TRAP_DIVOVF_ERROR, as that is the way
> set_exception_table_vec is called.  So let gcc know the other cases
> should not be considered by returning in all other cases.
> 
> This removes the warning and let's the code continue to build.

    Lets. :-)

> Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
> Fixes: c65626c0cd4d ("signal/sh: Use force_sig_fault where appropriate")
> Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
[...]

MBR, Sergei

      reply	other threads:[~2018-05-30  7:54 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <87604mhrnb.fsf@xmission.com>
2018-04-20 14:38 ` [REVIEW][PATCH 16/22] signal/sh: Use force_sig_fault where appropriate Eric W. Biederman
2018-04-20 14:55   ` Rich Felker
2018-05-28  9:19     ` Geert Uytterhoeven
2018-05-29 15:00       ` [PATCH] signal/sh: Stop gcc warning about an impossible case in do_divide_error Eric W. Biederman
2018-05-30  7:54         ` Sergei Shtylyov [this message]

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=8a890c7c-771a-2f10-6dc1-145a9f75e48a@cogentembedded.com \
    --to=sergei.shtylyov@cogentembedded.com \
    --cc=dalias@libc.org \
    --cc=ebiederm@xmission.com \
    --cc=geert@linux-m68k.org \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sh@vger.kernel.org \
    --cc=ysato@users.sourceforge.jp \
    /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).