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
8380655e
Commit
8380655e
authored
Nov 08, 2014
by
Matt Stancliff
Browse files
Remove ziplist compiler warnings
Only happen when compiled with the test define.
parent
27937c28
Changes
1
Show whitespace changes
Inline
Side-by-side
src/ziplist.c
View file @
8380655e
...
...
@@ -1028,10 +1028,12 @@ void pop(unsigned char *zl, int where) {
else
printf
(
"Pop tail: "
);
if
(
vstr
)
if
(
vstr
)
{
if
(
vlen
&&
fwrite
(
vstr
,
vlen
,
1
,
stdout
)
==
0
)
perror
(
"fwrite"
);
else
}
else
{
printf
(
"%lld"
,
vlong
);
}
printf
(
"
\n
"
);
ziplistDeleteRange
(
zl
,
-
1
,
1
);
...
...
@@ -1368,7 +1370,7 @@ int main(int argc, char **argv) {
{
char
v
[
3
][
257
];
zlentry
e
[
3
];
in
t
i
;
size_
t
i
;
for
(
i
=
0
;
i
<
(
sizeof
(
v
)
/
sizeof
(
v
[
0
]));
i
++
)
{
memset
(
v
[
i
],
'a'
+
i
,
sizeof
(
v
[
0
]));
...
...
@@ -1464,7 +1466,7 @@ int main(int argc, char **argv) {
for
(
i
=
0
;
i
<
20000
;
i
++
)
{
zl
=
ziplistNew
();
ref
=
listCreate
();
listSetFreeMethod
(
ref
,
sdsfree
);
listSetFreeMethod
(
ref
,
(
void
(
*
)(
void
*
))
sdsfree
);
len
=
rand
()
%
256
;
/* Create lists */
...
...
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