From 8da99acce0d987d4e66ea57b91987285b613f8d6 Mon Sep 17 00:00:00 2001 From: Cody Boone Ferguson <53008573+xexyl@users.noreply.github.com> Date: Fri, 19 Jan 2024 04:58:47 -0800 Subject: [PATCH] Make my fix to 1995/makarios more like original The parameters to the functions spell out (backwards) the function name. As for main() since there can only be three args it has in comments a fourth to spell out main (backwards). Also use old style ( main(n,i,a)char**i,**a;{/*..*/} ) as that's how the original code is (and the added function is that way too though only ints like main() used to be). Added -Wno-implicit-int -Wno-return-type to CSILENCE in Makefile. There's still one more warning but I'm not sure if it's supported by all compilers so I haven't disabled it (yet?). --- 1995/makarios/Makefile | 2 +- 1995/makarios/makarios.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/1995/makarios/Makefile b/1995/makarios/Makefile index d128cda77..e41fb65e8 100644 --- a/1995/makarios/Makefile +++ b/1995/makarios/Makefile @@ -39,7 +39,7 @@ include ../../var.mk # Common C compiler warnings to silence # CSILENCE= -Wno-error -Wno-implicit-function-declaration -Wno-parentheses \ - -Wno-int-conversion + -Wno-int-conversion -Wno-implicit-int -Wno-return-type # Common C compiler warning flags # diff --git a/1995/makarios/makarios.c b/1995/makarios/makarios.c index aad494825..6a3de2445 100644 --- a/1995/makarios/makarios.c +++ b/1995/makarios/makarios.c @@ -1,3 +1,3 @@ -pain(int n, char **ia, char **aa, char **ma){int i=ia, a=aa, m=ma; while(i=++n) -for(a=0;a