diff options
| author | cremno <[email protected]> | 2014-11-19 22:41:51 +0100 |
|---|---|---|
| committer | cremno <[email protected]> | 2014-11-20 02:39:46 +0100 |
| commit | 337395c1ee77ce511242a21ca51c0cdc2417424b (patch) | |
| tree | 373bb467231b34acfda9343bc97d69f3ed289715 /mrbgems/mruby-bin-debugger/tools | |
| parent | 88195a7c99b910ef81f64b29149d3246092e3a52 (diff) | |
| download | mruby-337395c1ee77ce511242a21ca51c0cdc2417424b.tar.gz mruby-337395c1ee77ce511242a21ca51c0cdc2417424b.zip | |
remove cast
C99+TC3, 7.19.7.1p2: [...] the fgetc function obtains that character as
an unsigned char converted to an int [...]
Diffstat (limited to 'mrbgems/mruby-bin-debugger/tools')
| -rwxr-xr-x | mrbgems/mruby-bin-debugger/tools/mrdb/apilist.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/mrbgems/mruby-bin-debugger/tools/mrdb/apilist.c b/mrbgems/mruby-bin-debugger/tools/mrdb/apilist.c index 53f5fe4ef..46201eb07 100755 --- a/mrbgems/mruby-bin-debugger/tools/mrdb/apilist.c +++ b/mrbgems/mruby-bin-debugger/tools/mrdb/apilist.c @@ -105,7 +105,8 @@ source_file_new(mrb_state *mrb, mrb_debug_context *dbg, char *filename) static mrb_bool remove_newlines(char *s, FILE *fp) { - char c, *p; + int c; + char *p; size_t len; if ((len = strlen(s)) == 0) { @@ -120,7 +121,7 @@ remove_newlines(char *s, FILE *fp) if (*p == '\r') { /* peek the next character and skip '\n' */ - if ((unsigned char)(c = fgetc(fp)) != '\n') { + if ((c = fgetc(fp)) != '\n') { ungetc(c, fp); } } |
