public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [COMMITTED PATCH 0/1] RISC-V: Minor fix to the 'Ztso' extension support, part 2
@ 2022-09-21 13:53 Tsukasa OI
  2022-09-21 13:53 ` [COMMITTED PATCH 1/1] RISC-V: Fix riscv_set_tso declaration Tsukasa OI
  0 siblings, 1 reply; 2+ messages in thread
From: Tsukasa OI @ 2022-09-21 13:53 UTC (permalink / raw)
  To: Tsukasa OI, Nelson Chu, Shihua LIAO; +Cc: binutils

Hi,

Obvious change related to -Werror=strict-prototypes is committed.

Change:
- Before:  static void riscv_set_tso () { ... }
- After:   static void riscv_set_tso (void) { ... }

The former () is used on function prototypes of old C standards, possibly
meaning a function with indeterminate arguments (deprecated though).  To
avoid ambiguity, we need to use (void) for function declaration with
no arguments.

Thanks,
Tsukasa




Tsukasa OI (1):
  RISC-V: Fix riscv_set_tso declaration

 gas/config/tc-riscv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


base-commit: f9a59eea78428159a9522bd64ec354a872f1dc31
-- 
2.34.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [COMMITTED PATCH 1/1] RISC-V: Fix riscv_set_tso declaration
  2022-09-21 13:53 [COMMITTED PATCH 0/1] RISC-V: Minor fix to the 'Ztso' extension support, part 2 Tsukasa OI
@ 2022-09-21 13:53 ` Tsukasa OI
  0 siblings, 0 replies; 2+ messages in thread
From: Tsukasa OI @ 2022-09-21 13:53 UTC (permalink / raw)
  To: Tsukasa OI, Nelson Chu, Shihua LIAO; +Cc: binutils

To avoid -Werror=strict-prototypes, this commit changes () to (void).
This is because "()" possibly means a function prototype with indeterminate
arguments on old C standards.

gas/ChangeLog:

	* config/tc-riscv.c (riscv_set_tso): Fix declaration.
---
 gas/config/tc-riscv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gas/config/tc-riscv.c b/gas/config/tc-riscv.c
index 42d7bf62e4f..5411d68a401 100644
--- a/gas/config/tc-riscv.c
+++ b/gas/config/tc-riscv.c
@@ -260,7 +260,7 @@ riscv_set_rvc (bool rvc_value)
 /* Turn on the tso flag for elf_flags once we have enabled ztso extension.  */
 
 static void
-riscv_set_tso ()
+riscv_set_tso (void)
 {
   elf_flags |= EF_RISCV_TSO;
 }
-- 
2.34.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-09-21 13:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-21 13:53 [COMMITTED PATCH 0/1] RISC-V: Minor fix to the 'Ztso' extension support, part 2 Tsukasa OI
2022-09-21 13:53 ` [COMMITTED PATCH 1/1] RISC-V: Fix riscv_set_tso declaration Tsukasa OI

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 read-only IMAP folder(s) and NNTP newsgroup(s).