From eaf85a757a9f7bb69c9bdc4bf6ec07e48f5769ac Mon Sep 17 00:00:00 2001 From: Takahiro Ueda Date: Wed, 21 Nov 2018 15:20:16 +0900 Subject: [PATCH] Remove more gcc warnings (gcc version dependent) --- sources/poly.cc | 2 +- sources/pre.c | 2 ++ sources/startup.c | 4 ++-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/sources/poly.cc b/sources/poly.cc index a0398a78..e934e19b 100644 --- a/sources/poly.cc +++ b/sources/poly.cc @@ -1997,7 +1997,7 @@ int poly::first_variable () const { int var = AN.poly_num_vars; for (int j=0; j0) var=j; + if (terms[2+j]>0) return j; return var; } diff --git a/sources/pre.c b/sources/pre.c index f2606108..c343210d 100644 --- a/sources/pre.c +++ b/sources/pre.c @@ -5248,6 +5248,7 @@ int DoExternal(UBYTE *s) case 10:/*'\0' fits here*/ MesPrint("@Can't finde closing \""); Terminate(-1); + break; case 0:case 1: continue; default: break; @@ -5629,6 +5630,7 @@ int DoFromExternal(UBYTE *s) case 10:/*'\0' fits here*/ MesPrint("@Can't finde closing \""); Terminate(-1); + break; case 0:case 1: continue; default: break; diff --git a/sources/startup.c b/sources/startup.c index e1cfe03e..b92ce1b9 100644 --- a/sources/startup.c +++ b/sources/startup.c @@ -1042,7 +1042,7 @@ VOID StartVariables() We do want to give them unique names though that the user cannot access. */ { - char dumstr[10]; + char dumstr[20]; for ( ; i < FIRSTUSERSYMBOL; i++ ) { sprintf(dumstr,":%d:",i); AddSymbol((UBYTE *)dumstr,-MAXPOWER,MAXPOWER,VARTYPENONE,0); @@ -1069,7 +1069,7 @@ VOID StartVariables() We do want to give them unique names though that the user cannot access. */ { - char dumstr[10]; + char dumstr[20]; for ( ; i < FIRSTUSERFUNCTION-FUNCTION; i++ ) { sprintf(dumstr,"::%d::",i); AddFunction((UBYTE *)dumstr,0,0,0,0,0,-1,-1);