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
86f8edca
Unverified
Commit
86f8edca
authored
Jul 17, 2021
by
Yukihiro "Matz" Matsumoto
Committed by
GitHub
Jul 17, 2021
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #5509 from dearblue/cast-c++
Avoid implicit casting from void pointers for C++
parents
d4e22c2c
c8750048
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
mrbgems/mruby-bin-debugger/tools/mrdb/apistring.c
mrbgems/mruby-bin-debugger/tools/mrdb/apistring.c
+4
-4
No files found.
mrbgems/mruby-bin-debugger/tools/mrdb/apistring.c
View file @
86f8edca
...
...
@@ -9,7 +9,7 @@
static
size_t
mrb_debug_strnlen
(
const
char
*
s
,
size_t
maxlen
)
{
const
char
*
p
=
memchr
(
s
,
'\0'
,
maxlen
);
const
char
*
p
=
(
const
char
*
)
memchr
(
s
,
'\0'
,
maxlen
);
return
p
!=
NULL
?
(
size_t
)(
p
-
s
)
:
maxlen
;
}
...
...
@@ -17,7 +17,7 @@ char*
mrdb_strndup
(
mrb_state
*
mrb
,
const
char
*
s
,
size_t
size
)
{
size_t
l
=
mrb_debug_strnlen
(
s
,
size
);
char
*
d
=
mrb_malloc_simple
(
mrb
,
l
+
1
);
char
*
d
=
(
char
*
)
mrb_malloc_simple
(
mrb
,
l
+
1
);
if
(
d
!=
NULL
)
{
memcpy
(
d
,
s
,
l
);
d
[
l
]
=
'\0'
;
...
...
@@ -29,6 +29,6 @@ char*
mrdb_strdup
(
mrb_state
*
mrb
,
const
char
*
s
)
{
size_t
z
=
strlen
(
s
)
+
1
;
char
*
d
=
mrb_malloc_simple
(
mrb
,
z
);
return
d
!=
NULL
?
memcpy
(
d
,
s
,
z
)
:
NULL
;
char
*
d
=
(
char
*
)
mrb_malloc_simple
(
mrb
,
z
);
return
d
!=
NULL
?
(
char
*
)
memcpy
(
d
,
s
,
z
)
:
NULL
;
}
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