mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Vincent Chen <vincentc@andestech.com>
To: <green.hu@gmail.com>, <arnd@arndb.de>
Cc: <linux-kernel@vger.kernel.org>, <vincentc@andestech.com>
Subject: [PATCH v4 5/5] math-emu/soft-fp.h: (_FP_ROUND_ZERO) cast 0 to void to fix warning
Date: Thu, 22 Nov 2018 11:14:38 +0800	[thread overview]
Message-ID: <1542856478-795-6-git-send-email-vincentc@andestech.com> (raw)
In-Reply-To: <1542856478-795-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-11-22  3:15 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-22  3:14 [PATCH v4 0/5] nds32 FPU port Vincent Chen
2018-11-22  3:14 ` [PATCH v4 1/5] nds32: " Vincent Chen
2018-11-22  3:14 ` [PATCH v4 2/5] nds32: Support FP emulation Vincent Chen
2018-11-23 10:53   ` David Laight
2018-11-26  1:23     ` Vincent Chen
2018-11-26 10:18       ` David Laight
2018-11-27  2:46         ` Vincent Chen
2018-11-22  3:14 ` [PATCH v4 3/5] nds32: support denormalized result through FP emulator Vincent Chen
2018-11-22  3:14 ` [PATCH v4 4/5] math-emu/op-2.h: Use statement expressions to prevent negative constant shift Vincent Chen
2018-11-22  3:14 ` Vincent Chen [this message]
2018-11-22 10:21 ` [PATCH v4 0/5] nds32 FPU port Greentime Hu

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=1542856478-795-6-git-send-email-vincentc@andestech.com \
    --to=vincentc@andestech.com \
    --cc=arnd@arndb.de \
    --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®