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
e952d55b
Commit
e952d55b
authored
Mar 28, 2013
by
Daniel Bovensiepen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Catch return values to silent compiler
parent
e265d7c7
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
4 deletions
+12
-4
src/load.c
src/load.c
+12
-4
No files found.
src/load.c
View file @
e952d55b
...
...
@@ -233,6 +233,7 @@ read_rite_lineno_record(mrb_state *mrb, const uint8_t *bin, size_t irepno, uint3
char
*
fname
;
short
*
lines
;
ret
=
MRB_DUMP_OK
;
bin
+=
sizeof
(
uint32_t
);
// record size
fname_len
=
bin_to_uint16
(
bin
);
bin
+=
sizeof
(
uint16_t
);
...
...
@@ -258,7 +259,7 @@ read_rite_lineno_record(mrb_state *mrb, const uint8_t *bin, size_t irepno, uint3
mrb
->
irep
[
irepno
]
->
lines
=
lines
;
error_exit:
return
MRB_DUMP_OK
;
return
ret
;
}
static
int
...
...
@@ -271,6 +272,7 @@ read_rite_section_lineno(mrb_state *mrb, const uint8_t *bin, size_t sirep)
uint16_t
n
;
const
struct
rite_section_lineno_header
*
header
;
len
=
0
;
header
=
(
const
struct
rite_section_lineno_header
*
)
bin
;
bin
+=
sizeof
(
struct
rite_section_lineno_header
);
...
...
@@ -397,7 +399,9 @@ read_rite_section_lineno_file(mrb_state *mrb, FILE *fp, size_t sirep)
const
size_t
record_header_size
=
4
;
struct
rite_section_lineno_header
header
;
fread
(
&
header
,
sizeof
(
struct
rite_section_lineno_header
),
1
,
fp
);
if
(
fread
(
&
header
,
sizeof
(
struct
rite_section_lineno_header
),
1
,
fp
)
==
0
)
{
/* 0 Items read */
}
nirep
=
bin_to_uint16
(
header
.
nirep
);
...
...
@@ -406,11 +410,15 @@ read_rite_section_lineno_file(mrb_state *mrb, FILE *fp, size_t sirep)
//Read Binary Data Section
for
(
n
=
0
,
i
=
sirep
;
n
<
nirep
;
n
++
,
i
++
)
{
fread
(
buf
,
record_header_size
,
1
,
fp
);
if
(
fread
(
buf
,
record_header_size
,
1
,
fp
)
==
0
)
{
/* 0 Items read */
}
buf_size
=
bin_to_uint32
(
&
buf
[
0
]);
buf
=
(
uint8_t
*
)
mrb_realloc
(
mrb
,
buf
,
buf_size
);
fread
(
&
buf
[
record_header_size
],
buf_size
-
record_header_size
,
1
,
fp
);
if
(
fread
(
&
buf
[
record_header_size
],
buf_size
-
record_header_size
,
1
,
fp
)
==
0
)
{
/* 0 Items read */
}
result
=
read_rite_lineno_record
(
mrb
,
buf
,
i
,
&
len
);
if
(
result
!=
MRB_DUMP_OK
)
goto
error_exit
;
...
...
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