diff options
author | Ian Lance Taylor <iant@golang.org> | 2013-06-25 10:44:25 -0700 |
---|---|---|
committer | Ian Lance Taylor <iant@golang.org> | 2013-06-25 10:44:25 -0700 |
commit | e259828ddf559b0910290c004fcc02f940860581 (patch) | |
tree | cadbe9796950d285d81a08142a211a6ad11068fe /src/lib9/tokenize.c | |
parent | 31d4ee6227d6a390712b66cb077c1e38df026e49 (diff) | |
download | go-e259828ddf559b0910290c004fcc02f940860581.tar.gz |
lib9: avoid all -Wconversion warnings
Built after adding -Wconversion to the list of compiler
arguments used when building. I believe these are all OK
assuming we will not change the API. There is no effort to
detect overflow due to very long strings.
R=golang-dev, dave, rsc, r
CC=golang-dev
https://codereview.appspot.com/10195044
Diffstat (limited to 'src/lib9/tokenize.c')
-rw-r--r-- | src/lib9/tokenize.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib9/tokenize.c b/src/lib9/tokenize.c index 52167ff2f..a9b593567 100644 --- a/src/lib9/tokenize.c +++ b/src/lib9/tokenize.c @@ -37,7 +37,7 @@ qtoken(char *s, char *sep) quoting = 0; t = s; /* s is output string, t is input string */ - while(*t!='\0' && (quoting || utfrune(sep, *t)==nil)){ + while(*t!='\0' && (quoting || utfrune(sep, (Rune)*t)==nil)){ if(*t != '\''){ *s++ = *t++; continue; @@ -74,7 +74,7 @@ etoken(char *t, char *sep) /* move to end of next token */ quoting = 0; - while(*t!='\0' && (quoting || utfrune(sep, *t)==nil)){ + while(*t!='\0' && (quoting || utfrune(sep, (Rune)*t)==nil)){ if(*t != '\''){ t++; continue; @@ -104,7 +104,7 @@ gettokens(char *s, char **args, int maxargs, char *sep) int nargs; for(nargs=0; nargs<maxargs; nargs++){ - while(*s!='\0' && utfrune(sep, *s)!=nil) + while(*s!='\0' && utfrune(sep, (Rune)*s)!=nil) *s++ = '\0'; if(*s == '\0') break; @@ -121,7 +121,7 @@ tokenize(char *s, char **args, int maxargs) int nargs; for(nargs=0; nargs<maxargs; nargs++){ - while(*s!='\0' && utfrune(qsep, *s)!=nil) + while(*s!='\0' && utfrune(qsep, (Rune)*s)!=nil) s++; if(*s == '\0') break; |