Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
hanoi2005
redis
提交
8ce39260
R
redis
项目概览
hanoi2005
/
redis
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
redis
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
8ce39260
编写于
12月 23, 2010
作者:
P
Pieter Noordhuis
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix compiler warnings on Solaris
上级
89191613
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
8 addition
and
4 deletion
+8
-4
src/redis-cli.c
src/redis-cli.c
+3
-1
src/redis.c
src/redis.c
+1
-1
src/ziplist.c
src/ziplist.c
+4
-2
未找到文件。
src/redis-cli.c
浏览文件 @
8ce39260
...
...
@@ -414,10 +414,11 @@ static sds cliFormatReplyRaw(redisReply *r) {
}
static
int
cliReadReply
(
int
output_raw_strings
)
{
void
*
_reply
;
redisReply
*
reply
;
sds
out
;
if
(
redisGetReply
(
context
,
(
void
**
)
&
reply
)
!=
REDIS_OK
)
{
if
(
redisGetReply
(
context
,
&
_
reply
)
!=
REDIS_OK
)
{
if
(
config
.
shutdown
)
return
REDIS_OK
;
if
(
config
.
interactive
)
{
...
...
@@ -431,6 +432,7 @@ static int cliReadReply(int output_raw_strings) {
return
REDIS_ERR
;
/* avoid compiler warning */
}
reply
=
(
redisReply
*
)
_reply
;
if
(
output_raw_strings
)
{
out
=
cliFormatReplyRaw
(
reply
);
}
else
{
...
...
src/redis.c
浏览文件 @
8ce39260
...
...
@@ -1476,7 +1476,7 @@ void createPidFile(void) {
/* Try to write the pid file in a best-effort way. */
FILE
*
fp
=
fopen
(
server
.
pidfile
,
"w"
);
if
(
fp
)
{
fprintf
(
fp
,
"%d
\n
"
,
getpid
());
fprintf
(
fp
,
"%d
\n
"
,
(
int
)
getpid
());
fclose
(
fp
);
}
}
...
...
src/ziplist.c
浏览文件 @
8ce39260
...
...
@@ -119,6 +119,7 @@ static unsigned int zipEntryEncoding(unsigned char *p) {
return
p
[
0
]
&
0xf0
;
}
assert
(
NULL
);
return
0
;
}
/* Return bytes needed to store integer encoded by 'encoding' */
...
...
@@ -129,13 +130,14 @@ static unsigned int zipIntSize(unsigned char encoding) {
case
ZIP_INT_64B
:
return
sizeof
(
int64_t
);
}
assert
(
NULL
);
return
0
;
}
/* Decode the encoded length pointed by 'p'. If a pointer to 'lensize' is
* provided, it is set to the number of bytes required to encode the length. */
static
unsigned
int
zipDecodeLength
(
unsigned
char
*
p
,
unsigned
int
*
lensize
)
{
unsigned
char
encoding
=
zipEntryEncoding
(
p
);
unsigned
int
len
;
unsigned
int
len
=
0
;
if
(
ZIP_IS_STR
(
encoding
))
{
switch
(
encoding
)
{
...
...
@@ -300,7 +302,7 @@ static void zipSaveInteger(unsigned char *p, int64_t value, unsigned char encodi
static
int64_t
zipLoadInteger
(
unsigned
char
*
p
,
unsigned
char
encoding
)
{
int16_t
i16
;
int32_t
i32
;
int64_t
i64
,
ret
;
int64_t
i64
,
ret
=
0
;
if
(
encoding
==
ZIP_INT_16B
)
{
memcpy
(
&
i16
,
p
,
sizeof
(
i16
));
ret
=
i16
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录