appease the gcc monster

This commit is contained in:
rsc 2005-08-10 18:14:40 +00:00
parent 61b8c11b66
commit 8477327a46

View file

@ -70,7 +70,7 @@ bournearg(char *s)
void void
rcprint(int argc, char *argv[]) rcprint(int argc, char *argv[])
{ {
register c, i, n; int c, i, n;
for(c=0;c!=NFLAG;c++) if(flag[c]){ for(c=0;c!=NFLAG;c++) if(flag[c]){
print("FLAG%c=", c); /* bug -- c could be a bad char */ print("FLAG%c=", c); /* bug -- c could be a bad char */
n=count(c, argv[1]); n=count(c, argv[1]);
@ -106,14 +106,14 @@ rcprint(int argc, char *argv[])
void void
usmsg(char *flagarg) usmsg(char *flagarg)
{ {
register char *s, *t, c; char *s, *t, c;
register count, nflag=0; int count, nflag=0;
print("echo Usage: $0'"); print("echo Usage: $0'");
for(s=flagarg;*s;){ for(s=flagarg;*s;){
c=*s; c=*s;
if(*s++==' ') continue; if(*s++==' ') continue;
if(*s==':') if(*s==':')
count = strtol(++s, &s, 10); count = strtol(s+1, &s, 10);
else count=0; else count=0;
if(count==0){ if(count==0){
if(nflag==0) print(" [-"); if(nflag==0) print(" [-");
@ -133,7 +133,7 @@ usmsg(char *flagarg)
c=*s; c=*s;
if(*s++==' ') continue; if(*s++==' ') continue;
if(*s==':') if(*s==':')
count = strtol(++s, &s, 10); count = strtol(s+1, &s, 10);
else count=0; else count=0;
if(count!=0){ if(count!=0){
print(" [-"); print(" [-");
@ -166,13 +166,13 @@ usmsg(char *flagarg)
int int
count(int flag, char *flagarg) count(int flag, char *flagarg)
{ {
register char *s, c; char *s, c;
register n; int n;
for(s=flagarg;*s;){ for(s=flagarg;*s;){
c=*s; c=*s;
if(*s++==' ') continue; if(*s++==' ') continue;
if(*s==':') if(*s==':')
n = strtol(++s, &s, 10); n = strtol(s+1, &s, 10);
else n=0; else n=0;
if(*s=='['){ if(*s=='['){
int depth=1; int depth=1;