Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mruby
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
mruby
Commits
c0a6439a
Commit
c0a6439a
authored
Jan 31, 2020
by
Yukihiro "Matz" Matsumoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Avoid implicit integer casting in `backtrace.c` and `hash.c`.
parent
10c2b7ee
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
4 deletions
+3
-4
src/backtrace.c
src/backtrace.c
+2
-2
src/hash.c
src/hash.c
+1
-2
No files found.
src/backtrace.c
View file @
c0a6439a
...
@@ -79,7 +79,7 @@ each_backtrace(mrb_state *mrb, ptrdiff_t ciidx, const mrb_code *pc0, each_backtr
...
@@ -79,7 +79,7 @@ each_backtrace(mrb_state *mrb, ptrdiff_t ciidx, const mrb_code *pc0, each_backtr
static
void
static
void
print_backtrace
(
mrb_state
*
mrb
,
struct
RObject
*
exc
,
mrb_value
backtrace
)
print_backtrace
(
mrb_state
*
mrb
,
struct
RObject
*
exc
,
mrb_value
backtrace
)
{
{
int
i
;
mrb_
int
i
;
mrb_int
n
=
RARRAY_LEN
(
backtrace
);
mrb_int
n
=
RARRAY_LEN
(
backtrace
);
mrb_value
*
loc
,
mesg
;
mrb_value
*
loc
,
mesg
;
FILE
*
stream
=
stderr
;
FILE
*
stream
=
stderr
;
...
@@ -89,7 +89,7 @@ print_backtrace(mrb_state *mrb, struct RObject *exc, mrb_value backtrace)
...
@@ -89,7 +89,7 @@ print_backtrace(mrb_state *mrb, struct RObject *exc, mrb_value backtrace)
for
(
i
=
n
-
1
,
loc
=&
RARRAY_PTR
(
backtrace
)[
i
];
i
>
0
;
i
--
,
loc
--
)
{
for
(
i
=
n
-
1
,
loc
=&
RARRAY_PTR
(
backtrace
)[
i
];
i
>
0
;
i
--
,
loc
--
)
{
if
(
mrb_string_p
(
*
loc
))
{
if
(
mrb_string_p
(
*
loc
))
{
fprintf
(
stream
,
"
\t
[%d] %.*s
\n
"
,
fprintf
(
stream
,
"
\t
[%d] %.*s
\n
"
,
i
,
(
int
)
RSTRING_LEN
(
*
loc
),
RSTRING_PTR
(
*
loc
));
(
int
)
i
,
(
int
)
RSTRING_LEN
(
*
loc
),
RSTRING_PTR
(
*
loc
));
}
}
}
}
if
(
mrb_string_p
(
*
loc
))
{
if
(
mrb_string_p
(
*
loc
))
{
...
...
src/hash.c
View file @
c0a6439a
...
@@ -222,9 +222,8 @@ static void
...
@@ -222,9 +222,8 @@ static void
ht_compact
(
mrb_state
*
mrb
,
htable
*
t
)
ht_compact
(
mrb_state
*
mrb
,
htable
*
t
)
{
{
segment
*
seg
;
segment
*
seg
;
mrb_int
i
;
uint16_t
i
,
i2
;
segment
*
seg2
=
NULL
;
segment
*
seg2
=
NULL
;
mrb_int
i2
;
mrb_int
size
=
0
;
mrb_int
size
=
0
;
if
(
t
==
NULL
)
return
;
if
(
t
==
NULL
)
return
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment