File 1116-erts-Modernize-K-R-style-functions.patch of Package erlang
From 2269b39d88b6826c5f59a66db1b5dde1cd2abd11 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= <bjorn@erlang.org>
Date: Sun, 11 Jun 2023 07:00:19 +0200
Subject: [PATCH 1/3] erts: Modernize K&R-style functions
Modern versions of Clang warn about functions using K&R syntax.
---
erts/emulator/beam/code_ix.c | 6 +++---
erts/lib_src/yielding_c_fun/ycf_yield_fun.c | 6 +++---
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/erts/lib_src/yielding_c_fun/ycf_yield_fun.c b/erts/lib_src/yielding_c_fun/ycf_yield_fun.c
index cd927b7716..bc8dccd56a 100644
--- a/erts/lib_src/yielding_c_fun/ycf_yield_fun.c
+++ b/erts/lib_src/yielding_c_fun/ycf_yield_fun.c
@@ -806,13 +806,13 @@ void ast_add_yield_code_generated_define(ycf_node* source_out_tree/*Will be changed*/, bool debug_mode)
"#include <setjmp.h>\n"
"#include <stdint.h>\n"
"#include <string.h>\n"
- "static void* ycf_find_stack_bottom_conservative_helper() {\n"
+ "static void* ycf_find_stack_bottom_conservative_helper(void) {\n"
" void* p = NULL;\n"
" volatile intptr_t tmp = (intptr_t)&p;\n"
" /* codechecker_intentional [StackAddrEscapeBase] */\n"
" return (void*)tmp;\n"
"}\n"
- "static void* ycf_find_stack_bottom_conservative() {\n"
+ "static void* ycf_find_stack_bottom_conservative(void) {\n"
" jmp_buf env;\n"
" setjmp(env);\n"
"\n"
--
2.35.3