Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
B
Beam Positoning Monitor - Software
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
Beam Positoning Monitor - Software
Commits
b1f537ee
Commit
b1f537ee
authored
Aug 05, 2016
by
Janito Vaqueiro Ferreira Filho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
foreign/libsdbfs: fix comparison warnings
Force compared expressions into unsigned values.
parent
81cf88a2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
access.c
foreign/libsdbfs/access.c
+3
-3
glue.c
foreign/libsdbfs/glue.c
+1
-1
No files found.
foreign/libsdbfs/access.c
View file @
b1f537ee
...
...
@@ -27,7 +27,7 @@ int sdbfs_fread(struct sdbfs *fs, int offset, void *buf, int count)
return
-
ENOENT
;
if
(
offset
<
0
)
offset
=
fs
->
read_offset
;
if
(
offset
+
count
>
fs
->
f_len
)
if
(
(
unsigned
int
)(
offset
+
count
)
>
fs
->
f_len
)
count
=
fs
->
f_len
-
offset
;
ret
=
count
;
if
(
fs
->
data
)
...
...
@@ -47,7 +47,7 @@ int sdbfs_fwrite(struct sdbfs *fs, int offset, void *buf, int count)
return
-
ENOENT
;
if
(
offset
<
0
)
offset
=
fs
->
read_offset
;
if
(
offset
+
count
>
fs
->
f_len
)
if
(
(
unsigned
int
)(
offset
+
count
)
>
fs
->
f_len
)
count
=
fs
->
f_len
-
offset
;
ret
=
count
;
if
(
fs
->
data
)
...
...
@@ -67,7 +67,7 @@ int sdbfs_ferase(struct sdbfs *fs, int offset, int count)
return
-
ENOENT
;
if
(
offset
<
0
)
offset
=
fs
->
read_offset
;
if
(
offset
+
count
>
fs
->
f_len
)
if
(
(
unsigned
int
)(
offset
+
count
)
>
fs
->
f_len
)
count
=
fs
->
f_len
-
offset
;
ret
=
count
;
if
(
fs
->
data
)
...
...
foreign/libsdbfs/glue.c
View file @
b1f537ee
...
...
@@ -90,7 +90,7 @@ static struct sdb_device *sdbfs_readentry(struct sdbfs *fs,
if
(
fs
->
flags
&
SDBFS_F_CONVERT32
)
{
uint32_t
*
p
=
(
void
*
)
&
fs
->
current_record
;
int
i
;
unsigned
int
i
;
for
(
i
=
0
;
i
<
sizeof
(
fs
->
current_record
)
/
sizeof
(
*
p
);
i
++
)
p
[
i
]
=
ntohl
(
p
[
i
]);
...
...
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