| Age | Commit message (Collapse) | Author |
|
Fix warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
As detected in a Coverity scan. https://scan8.coverity.com/reports.htm#v26153/p11375/fileInstanceId=6844472&defectInstanceId=2516000&mergedDefectId=75866
|
|
|
|
Here are suppressed warnings:
src/fmt_fp.c: In function 'fmt_fp':
src/fmt_fp.c:124:16: warning: initialization discards 'const' qualifier from pointer target type
char *ss = (t&32)?"inf":"INF";
^
src/fmt_fp.c:125:17: warning: assignment discards 'const' qualifier from pointer target type
if (y!=y) ss=(t&32)?"nan":"NAN";
^
mrbgems/mruby-string-ext/src/string.c: In function 'mrb_str_succ_bang':
mrbgems/mruby-string-ext/src/string.c:302:27: warning: assignment discards 'const' qualifier from pointer target type
if (e == b) prepend = "1";
^
mrbgems/mruby-string-ext/src/string.c:305:27: warning: assignment discards 'const' qualifier from pointer target type
if (e == b) prepend = "a";
^
mrbgems/mruby-string-ext/src/string.c:308:27: warning: assignment discards 'const' qualifier from pointer target type
if (e == b) prepend = "A";
^
mrbgems/mruby-bin-mruby/tools/mruby/mruby.c: In function 'main':
mrbgems/mruby-bin-mruby/tools/mruby/mruby.c:213:13: warning: assignment discards 'const' qualifier from pointer target type
cmdline = args.cmdline ? args.cmdline : "-";
^
mrbgems/mruby-bin-debugger/tools/mrdb/cmdbreak.c: In function 'print_breakpoint':
mrbgems/mruby-bin-debugger/tools/mrdb/cmdbreak.c:159:3: warning: initialization discards 'const' qualifier from pointer target type
char* enable_letter[] = {BREAK_INFO_MSG_DISABLE, BREAK_INFO_MSG_ENABLE};
^
mrbgems/mruby-bin-debugger/tools/mrdb/cmdbreak.c:159:3: warning: initialization discards 'const' qualifier from pointer target type
|
|
|
|
mrdb, mirb: Add fflush() so that a external program can read output imme...
|
|
How to reproduce:
```
cat a.rb
Proc.new { 1 }.call
echo step | mrdb a.rb
```
|
|
Use sizeof() instead of strlen().
|
|
* `mrb_show_version()`
* `mrb_show_copyright()`
|
|
|
|
When mrb_open() is called again, it is not checked.
|
|
|
|
|
|
Before fix:
```
$ mrdb c:\tmp\b.rb
(c:\tmp\b.rb:1) break c:\tmp\b.rb:3
Class name 'c' is invalid.
```
After fix:
```
$ mrdb c:\tmp\b.rb
(c:\tmp\b.rb:1) break c:\tmp\b.rb:3
Breakpoint 1: file c:\tmp\b.rb, line 3.
```
|
|
|
|
As they are safer to use than mrb_malloc()+strlen()+strncpy() (see #2652).
|
|
They behave similar to their POSIX equivalents, except
mrb_malloc_simple() is used for memory allocation and
errno might not be set since ISO C99 doesn't have ENOMEM.
|
|
|
|
|
|
mrdb: add missing null-termination
|
|
|
|
|
|
mrdb: minor changes
|
|
|
|
|
|
clang 3.5.0 with -Wextra produces a -Wignored-qualifiers diagnostic.
|
|
|
|
C99+TC3, 7.19.7.1p2: [...] the fgetc function obtains that character as
an unsigned char converted to an int [...]
|
|
|
|
|