From c3409062805e9520df7f96a14a66762857d7b904 Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Sun, 24 Oct 2021 15:29:36 +0300 Subject: [PATCH] cgen: cleanup vinit_string_literals, _vcleanup and reload_so declarations --- vlib/v/gen/c/cgen.v | 4 ++-- vlib/v/gen/c/cheaders.v | 4 +--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/vlib/v/gen/c/cgen.v b/vlib/v/gen/c/cgen.v index ead8b325fa..afe16701f4 100644 --- a/vlib/v/gen/c/cgen.v +++ b/vlib/v/gen/c/cgen.v @@ -595,7 +595,7 @@ pub fn (mut g Gen) init() { g.stringliterals.writeln('') g.stringliterals.writeln('// >> string literal consts') if g.pref.build_mode != .build_module { - g.stringliterals.writeln('void vinit_string_literals(){') + g.stringliterals.writeln('void vinit_string_literals(void){') } } if g.pref.compile_defines_all.len > 0 { @@ -6152,7 +6152,7 @@ fn (mut g Gen) write_init_function() { } // fn_vcleanup_start_pos := g.out.len - g.writeln('void _vcleanup() {') + g.writeln('void _vcleanup(void) {') if g.is_autofree { // g.writeln('puts("cleaning up...");') reversed_table_modules := g.table.modules.reverse() diff --git a/vlib/v/gen/c/cheaders.v b/vlib/v/gen/c/cheaders.v index c7f941c125..f9e568a08b 100644 --- a/vlib/v/gen/c/cheaders.v +++ b/vlib/v/gen/c/cheaders.v @@ -386,9 +386,8 @@ typedef int (*qsort_callback_func)(const void*, const void*); //================================== GLOBALS =================================*/ int load_so(byteptr); -void reload_so(); void _vinit(int ___argc, voidptr ___argv); -void _vcleanup(); +void _vcleanup(void); #define sigaction_size sizeof(sigaction); #define _ARR_LEN(a) ( (sizeof(a)) / (sizeof(a[0])) ) @@ -569,7 +568,6 @@ typedef __builtin_va_list va_list; //================================== GLOBALS =================================*/ int load_so(byteptr); -void reload_so(); void _vinit(int ___argc, voidptr ___argv); void _vcleanup(); #define sigaction_size sizeof(sigaction);