Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
a650aaaf
Commit
a650aaaf
authored
Jun 05, 2016
by
Pierre Chapuis
Committed by
antirez
Jun 10, 2016
Browse files
fix some compiler warnings
parent
3fd4baf1
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/bitops.c
View file @
a650aaaf
...
...
@@ -299,7 +299,7 @@ int checkUnsignedBitfieldOverflow(uint64_t value, int64_t incr, uint64_t bits, i
handle_wrap:
{
uint64_t
mask
=
((
int64_t
)
-
1
)
<<
bits
;
uint64_t
mask
=
((
u
int64_t
)
-
1
)
<<
bits
;
uint64_t
res
=
value
+
incr
;
res
&=
~
mask
;
...
...
@@ -342,7 +342,7 @@ int checkSignedBitfieldOverflow(int64_t value, int64_t incr, uint64_t bits, int
handle_wrap:
{
uint64_t
mask
=
((
int64_t
)
-
1
)
<<
bits
;
uint64_t
mask
=
((
u
int64_t
)
-
1
)
<<
bits
;
uint64_t
msb
=
(
uint64_t
)
1
<<
(
bits
-
1
);
uint64_t
a
=
value
,
b
=
incr
,
c
;
c
=
a
+
b
;
/* Perform addition as unsigned so that's defined. */
...
...
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