From: Nikola Knezevic Date: Fri, 24 Aug 2001 22:10:42 +0000 (+0200) Subject: quiet down VC++ warnings in a2py.c and walk.c X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=c5cf9ec268be725ef943af3a8c93c6ce5c5492de;p=p5sagit%2Fp5-mst-13.2.git quiet down VC++ warnings in a2py.c and walk.c Message-Id: <1065978076.20010824221042@tesla.rcub.bg.ac.yu> p4raw-id: //depot/perl@11744 --- diff --git a/x2p/a2py.c b/x2p/a2py.c index d4cb59f..cd396a2 100644 --- a/x2p/a2py.c +++ b/x2p/a2py.c @@ -200,6 +200,8 @@ main(register int argc, register char **argv, register char **env) "The operation I've selected may be wrong for the operand types.\n"); } exit(0); + /* by ANSI specs return is needed. This also shuts up VC++ and his warnings */ + return(0); } #define RETURN(retval) return (bufptr = s,retval) diff --git a/x2p/walk.c b/x2p/walk.c index 4d5f1d3..f8fad55 100644 --- a/x2p/walk.c +++ b/x2p/walk.c @@ -254,7 +254,7 @@ sub Pick {\n\ } *d = '\0'; for (d=tokenbuf; *d; d++) - *d += 128; + *d += (char)128; str_cat(str,tokenbuf); str_free(tmpstr); str_cat(str,"/"); @@ -849,9 +849,9 @@ sub Pick {\n\ tmp2str=walk(1,level,ops[ops[node+2].ival+1].ival,&numarg,P_MIN); for (t = tmp2str->str_ptr, d=tokenbuf; *t; d++,t++) { if (*t == '&') - *d++ = '$' + 128; + *d++ = '$' + (char)128; else if (*t == '$') - *d++ = '\\' + 128; + *d++ = '\\' + (char)128; *d = *t + 128; } *d = '\0'; @@ -931,7 +931,7 @@ sub Pick {\n\ case '\\': case '"': case 'n': case 't': case '$': break; default: /* hide this from perl */ - *d++ = '\\' + 128; + *d++ = '\\' + (char)128; } } *d = *t + 128; @@ -1008,7 +1008,7 @@ sub Pick {\n\ strcpy(tokenbuf,"]"); else strcpy(tokenbuf,"}"); - *tokenbuf += 128; + *tokenbuf += (char)128; str_cat(str,tokenbuf); } } @@ -1060,7 +1060,7 @@ sub Pick {\n\ str_set(str,";"); tmpstr = walk(0,level,ops[node+1].ival,&numarg,P_MIN); for (s = tmpstr->str_ptr; *s && *s != '\n'; s++) - *s += 128; + *s += (char)128; str_scat(str,tmpstr); str_free(tmpstr); tab(str,level); @@ -1069,7 +1069,7 @@ sub Pick {\n\ str = str_new(0); tmpstr = walk(0,level,ops[node+1].ival,&numarg,P_MIN); for (s = tmpstr->str_ptr; *s && *s != '\n'; s++) - *s += 128; + *s += (char)128; str_scat(str,tmpstr); str_free(tmpstr); tab(str,level);