[flang][Runtime] Use proper prototypes in Fortran_main. NFCI
authorDiana Picus <diana.picus@linaro.org>
Mon, 16 May 2022 07:58:09 +0000 (07:58 +0000)
committerDiana Picus <diana.picus@linaro.org>
Wed, 18 May 2022 08:04:09 +0000 (08:04 +0000)
This is compiled as C code, so it's a good idea to be explicit about the
prototype. Clang complains about this when -Wstrict-prototypes is used.

Differential Revision: https://reviews.llvm.org/D125672

flang/include/flang/Runtime/main.h
flang/runtime/FortranMain/Fortran_main.c

index 50bc46e..e3dcbaf 100644 (file)
@@ -14,7 +14,7 @@
 
 FORTRAN_EXTERN_C_BEGIN
 void RTNAME(ProgramStart)(int, const char *[], const char *[]);
-void RTNAME(ByteswapOption)(); // -byteswapio
+void RTNAME(ByteswapOption)(void); // -byteswapio
 FORTRAN_EXTERN_C_END
 
 #endif // FORTRAN_RUNTIME_MAIN_H_
index 6a095ee..0c26a9d 100644 (file)
@@ -10,7 +10,7 @@
 #include "flang/Runtime/stop.h"
 
 /* main entry into PROGRAM */
-void _QQmain();
+void _QQmain(void);
 
 /* C main stub */
 int main(int argc, const char *argv[], const char *envp[]) {