mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Vincent Chen <vincentc@andestech.com>
To: <green.hu@gmail.com>, <linux-kernel@vger.kernel.org>,
	<arnd@arndb.de>, <deanbo422@gmail.com>
Cc: Vincent Chen <vincentc@andestech.com>
Subject: [PATCH v2 5/5] math-emu/soft-fp.h: (_FP_ROUND_ZERO) cast 0 to void to fix warning
Date: Thu, 11 Oct 2018 10:20:50 +0800	[thread overview]
Message-ID: <1539224450-19928-6-git-send-email-vincentc@andestech.com> (raw)
In-Reply-To: <1539224450-19928-1-git-send-email-vincentc@andestech.com>

_FP_ROUND_ZERO is defined as 0 and used as a statemente in macro
_FP_ROUND. This generates "error: statement with no effect
[-Werror=unused-value]" from gcc. Defining _FP_ROUND_ZERO as (void)0 to
fix it.

This modification is quoted from glibc 'commit <In libc/:>
(8ed1e7d5894000c155acbd06f)'

Signed-off-by: Vincent Chen <vincentc@andestech.com>
---
 include/math-emu/soft-fp.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/include/math-emu/soft-fp.h b/include/math-emu/soft-fp.h
index 3f284bc..5650c16 100644
--- a/include/math-emu/soft-fp.h
+++ b/include/math-emu/soft-fp.h
@@ -138,7 +138,7 @@
       _FP_FRAC_ADDI_##wc(X, _FP_WORK_ROUND);		\
 } while (0)
 
-#define _FP_ROUND_ZERO(wc, X)		0
+#define _FP_ROUND_ZERO(wc, X)		(void)0
 
 #define _FP_ROUND_PINF(wc, X)				\
 do {							\
-- 
1.7.1


      parent reply	other threads:[~2018-10-11  2:55 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-11  2:20 [PATCH v2 0/5] nds32 FPU port Vincent Chen
2018-10-11  2:20 ` [PATCH v2 1/5] nds32: " Vincent Chen
2018-10-11  7:30   ` Arnd Bergmann
2018-10-12  8:49     ` Vincent Chen
2018-10-12  9:22       ` Arnd Bergmann
2018-10-11  2:20 ` [PATCH v2 2/5] nds32: Support FP emulation Vincent Chen
2018-10-11  2:20 ` [PATCH v2 3/5] nds32: support denormalized result through FP emulator Vincent Chen
2018-10-11  2:20 ` [PATCH v2 4/5] math-emu/op-2.h: Use statement expressions to prevent negative constant shift Vincent Chen
2018-10-11  2:20 ` Vincent Chen [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=1539224450-19928-6-git-send-email-vincentc@andestech.com \
    --to=vincentc@andestech.com \
    --cc=arnd@arndb.de \
    --cc=deanbo422@gmail.com \
    --cc=green.hu@gmail.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®