changeset 32844:77410d5eabdf

maint: Reintroduce "(void)" in specific cases with extern "C" There were two function definitions and one function declaration inside extern "C" blocks in .cc files that took no arguments. It was not clear whether they would be interpreted as taking zero arguments, or an undefined number of arguments. For good measure, all three are tagged with (void). See https://octave.discourse.group/t/remove-void-from-mex-cc-and-elsewhere/5221/5 * mach-info.cc: as above * f77-dummy-main.cc: as above * quit.cc: as above
author Arun Giridhar <arungiridhar@gmail.com>
date Thu, 25 Jan 2024 06:20:51 -0500
parents 54475b490e22
children 75825900637c 28f782f03fb8
files liboctave/system/mach-info.cc liboctave/util/f77-dummy-main.cc liboctave/util/quit.cc
diffstat 3 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/liboctave/system/mach-info.cc	Wed Jan 24 20:13:08 2024 -0500
+++ b/liboctave/system/mach-info.cc	Thu Jan 25 06:20:51 2024 -0500
@@ -33,9 +33,9 @@
 
 extern "C"
 {
-  int octave_get_float_format ();
+  int octave_get_float_format (void);
 
-  int octave_is_big_endian ();
+  int octave_is_big_endian (void);
 }
 
 OCTAVE_BEGIN_NAMESPACE(octave)
--- a/liboctave/util/f77-dummy-main.cc	Wed Jan 24 20:13:08 2024 -0500
+++ b/liboctave/util/f77-dummy-main.cc	Thu Jan 25 06:20:51 2024 -0500
@@ -37,7 +37,7 @@
 
 extern "C"
 int
-F77_DUMMY_MAIN ()
+F77_DUMMY_MAIN (void)
 {
   assert (0);
 
--- a/liboctave/util/quit.cc	Wed Jan 24 20:13:08 2024 -0500
+++ b/liboctave/util/quit.cc	Thu Jan 25 06:20:51 2024 -0500
@@ -100,7 +100,7 @@
 OCTAVE_END_NAMESPACE(octave)
 
 extern "C" OCTAVE_API void
-octave_quit_c ()
+octave_quit_c (void)
 {
   octave_quit ();
 }