* [PATCH] testsuite: Avoid C99 compatibility issues in run-native-test.sh
@ 2023-04-22 19:37 Florian Weimer
2023-04-22 19:56 ` Mark Wielaard
0 siblings, 1 reply; 2+ messages in thread
From: Florian Weimer @ 2023-04-22 19:37 UTC (permalink / raw)
To: elfutils-devel
Include <unistd.h> for the pause function, and add the return type
of main. Avoids an implicit function declaration and implicit int.
Signed-off-by: Florian Weimer <fweimer@redhat.com>
---
Related to:
<https://fedoraproject.org/wiki/Changes/PortingToModernC>
<https://fedoraproject.org/wiki/Toolchain/PortingToModernC>
tests/run-native-test.sh | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tests/run-native-test.sh b/tests/run-native-test.sh
index d19007f2..042a51c6 100755
--- a/tests/run-native-test.sh
+++ b/tests/run-native-test.sh
@@ -27,7 +27,8 @@
# in all builds.
tempfiles native.c native
-echo 'main () { while (1) pause (); }' > native.c
+printf '#include <unistd.h>\nint main (void) { while (1) pause (); }\n' \
+ > native.c
native=0
kill_native()
base-commit: 4d8de4b2fa05495d69d09e1a3d335f24d6bf33ee
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] testsuite: Avoid C99 compatibility issues in run-native-test.sh
2023-04-22 19:37 [PATCH] testsuite: Avoid C99 compatibility issues in run-native-test.sh Florian Weimer
@ 2023-04-22 19:56 ` Mark Wielaard
0 siblings, 0 replies; 2+ messages in thread
From: Mark Wielaard @ 2023-04-22 19:56 UTC (permalink / raw)
To: Florian Weimer; +Cc: elfutils-devel
Hi Florian,
On Sat, Apr 22, 2023 at 09:37:09PM +0200, Florian Weimer via Elfutils-devel wrote:
> Include <unistd.h> for the pause function, and add the return type
> of main. Avoids an implicit function declaration and implicit int.
Thanks, pushed.
Cheers,
Mark
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-04-22 19:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-22 19:37 [PATCH] testsuite: Avoid C99 compatibility issues in run-native-test.sh Florian Weimer
2023-04-22 19:56 ` Mark Wielaard
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).