[PATCH] bfd: Remove return with expression in void function

Michael Forney mforney@mforney.org
Thu Feb 10 23:10:12 GMT 2022


This is not allowed in ISO C (C11 6.8.6.4p1):

> A return statement with an expression shall not appear in a
> function whose return type is void.

2022-02-10  Michael Forney  <mforney@mforney.org>

        * bfd.c (bfd_set_gp_value): Remove return with expression
        in void function.
---
 bfd/bfd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bfd/bfd.c b/bfd/bfd.c
index a2f294da983..d83371333fe 100644
--- a/bfd/bfd.c
+++ b/bfd/bfd.c
@@ -1876,7 +1876,7 @@ DESCRIPTION
 void
 bfd_set_gp_value (bfd *abfd, bfd_vma v)
 {
-  return _bfd_set_gp_value (abfd, v);
+  _bfd_set_gp_value (abfd, v);
 }
 
 /*
-- 
2.34.1



More information about the Binutils mailing list