From e2d2c11a6e1fac983e1b9b471945c248ca33a553 Mon Sep 17 00:00:00 2001 From: carl Date: Sat, 11 May 2019 01:07:00 +0800 Subject: [PATCH] Fix some compiler warnings. --- lang/basic/src/symbols.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/lang/basic/src/symbols.c b/lang/basic/src/symbols.c index 2551ece45..08017cc57 100644 --- a/lang/basic/src/symbols.c +++ b/lang/basic/src/symbols.c @@ -13,11 +13,6 @@ #include "util.h" - -#ifndef NORCSID -static char rcs_id[] = "$Id$" ; -#endif - /* Symboltable management module */ int deftype[128]; /* default type declarer */ @@ -32,8 +27,8 @@ void initdeftype(void) { int i; - for(i='a';i<='z';i++) deftype[i]= DOUBLETYPE; - for(i='A';i<='Z';i++) deftype[i]= DOUBLETYPE; + for(i='a';i<='z';i++) deftype[(unsigned char)i]= DOUBLETYPE; + for(i='A';i<='Z';i++) deftype[(unsigned char)i]= DOUBLETYPE; } @@ -223,9 +218,9 @@ void setdefaulttype(int type) last= *cptr; if ( !isalpha(last)) error("letter expected"); - else for(i=first;i<=last;i++) deftype[i]= type; + else for(i=first;i<=last;i++) deftype[(unsigned char)i]= type; cptr++; - } else deftype[first]=type; + } else deftype[(unsigned char)first]=type; if ( *cptr== ',') { cptr++;