[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 1/1] config.guess: Use int
From: |
Petr Vorel |
Subject: |
[PATCH 1/1] config.guess: Use int |
Date: |
Wed, 3 Apr 2024 19:01:03 +0200 |
Although -Wmain-return-type is not considered as error (unlike
-Wimplicit-int on gcc 14 and clang 16), but just a warning, let's fix it
for the future.
<stdin>:1:1: warning: return type of 'main' is not 'int' [-Wmain-return-type]
Signed-off-by: Petr Vorel <petr.vorel@gmail.com>
---
Hi,
based on the report from Buildroot about similar issue:
https://lore.kernel.org/buildroot/20240403121807.2087547-1-robimarko@gmail.com/
config.guess | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/config.guess b/config.guess
index f6d217a..bf4d163 100755
--- a/config.guess
+++ b/config.guess
@@ -4,7 +4,7 @@
# shellcheck disable=SC2006,SC2268 # see below for rationale
-timestamp='2024-01-01'
+timestamp='2024-01-03'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@@ -634,7 +634,7 @@ EOF
sed 's/^ //' << EOF > "$dummy.c"
#include <sys/systemcfg.h>
- main()
+ int main()
{
if (!__power_pc())
exit(1);
@@ -780,8 +780,7 @@ EOF
set_cc_for_build
sed 's/^ //' << EOF > "$dummy.c"
#include <unistd.h>
- int
- main ()
+ int main ()
{
long cpu = sysconf (_SC_CPU_VERSION);
/* The order matters, because CPU_IS_HP_MC68K erroneously returns
@@ -1621,7 +1620,7 @@ cat > "$dummy.c" <<EOF
#endif
#endif
#endif
-main ()
+int main ()
{
#if defined (sony)
#if defined (MIPSEB)
--
2.43.0
- [PATCH 1/1] config.guess: Use int,
Petr Vorel <=