Skip to content

Commit eaf85a7

Browse files
committed
Remove more gcc warnings (gcc version dependent)
1 parent a85f0c1 commit eaf85a7

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

sources/poly.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1997,7 +1997,7 @@ int poly::first_variable () const {
19971997

19981998
int var = AN.poly_num_vars;
19991999
for (int j=0; j<var; j++)
2000-
if (terms[2+j]>0) var=j;
2000+
if (terms[2+j]>0) return j;
20012001
return var;
20022002
}
20032003

sources/pre.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5248,6 +5248,7 @@ int DoExternal(UBYTE *s)
52485248
case 10:/*'\0' fits here*/
52495249
MesPrint("@Can't finde closing \"");
52505250
Terminate(-1);
5251+
break;
52515252
case 0:case 1: continue;
52525253
default:
52535254
break;
@@ -5629,6 +5630,7 @@ int DoFromExternal(UBYTE *s)
56295630
case 10:/*'\0' fits here*/
56305631
MesPrint("@Can't finde closing \"");
56315632
Terminate(-1);
5633+
break;
56325634
case 0:case 1: continue;
56335635
default:
56345636
break;

sources/startup.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1042,7 +1042,7 @@ VOID StartVariables()
10421042
We do want to give them unique names though that the user cannot access.
10431043
*/
10441044
{
1045-
char dumstr[10];
1045+
char dumstr[20];
10461046
for ( ; i < FIRSTUSERSYMBOL; i++ ) {
10471047
sprintf(dumstr,":%d:",i);
10481048
AddSymbol((UBYTE *)dumstr,-MAXPOWER,MAXPOWER,VARTYPENONE,0);
@@ -1069,7 +1069,7 @@ VOID StartVariables()
10691069
We do want to give them unique names though that the user cannot access.
10701070
*/
10711071
{
1072-
char dumstr[10];
1072+
char dumstr[20];
10731073
for ( ; i < FIRSTUSERFUNCTION-FUNCTION; i++ ) {
10741074
sprintf(dumstr,"::%d::",i);
10751075
AddFunction((UBYTE *)dumstr,0,0,0,0,0,-1,-1);

0 commit comments

Comments
 (0)