首页
下载
文档
问答社区
视频
捐赠
源代码
AI 助理
赞助商
CRMEB
Apipost
腾讯云
微擎
禅道
51Talk
商业产品
Swoole AI 智能文档翻译器
Swoole-Compiler PHP 代码加密器
CRMEB 新零售社交电商系统
登录
注册
全部
提问
分享
讨论
建议
公告
开发框架
CodeGalaxy
发表新帖
cygwin 安装redis失败
lgy@DESKTOP-V8NEBLS /home/redis-stable/deps/hiredis $ make cc -std=c99 -pedantic -c -O3 -fPIC -Wall -W -Wstrict-prototypes -Wwrite-strings -g -ggdb net.c In file included from net.h:38:0, from net.c:54: net.c: 在函数‘__redisSetErrorFromErrno’中: hiredis.h:90:9: 警告:implicit declaration of function ‘strerror_r’; did you mean ‘_strerror_r’? [-Wimplicit-function-declaration] strerror_r((errno), (buf), (len)); \ ^ net.c:73:5: 附注:in expansion of macro ‘__redis_strerror_r’ __redis_strerror_r(errno, (char *)(buf + len), sizeof(buf) - len); ^~~~~~~~~~~~~~~~~~ net.c: 在函数‘_redisContextConnectTcp’中: net.c:270:21: 错误:‘hints’的存储大小未知 struct addrinfo hints, *servinfo, *bservinfo, *p, *b; ^~~~~ net.c:291:23: 警告:implicit declaration of function ‘strdup’; did you mean ‘sdsdup’? [-Wimplicit-function-declaration] c->tcp.host = strdup(addr); ^~~~~~ sdsdup net.c:291:21: 警告:赋值时将整数赋给指针,未作类型转换 [-Wint-conversion] c->tcp.host = strdup(addr); ^ net.c:317:28: 警告:赋值时将整数赋给指针,未作类型转换 [-Wint-conversion] c->tcp.source_addr = strdup(source_addr); ^ net.c:330:15: 警告:隐式声明函数‘getaddrinfo’ [-Wimplicit-function-declaration] if ((rv = getaddrinfo(c->tcp.host,_port,&hints,&servinfo)) != 0) { ^~~~~~~~~~~ net.c:333:47: 警告:implicit declaration of function ‘gai_strerror’; did you mean ‘strerror’? [-Wimplicit-function-declaration] __redisSetError(c,REDIS_ERR_OTHER,gai_strerror(rv)); ^~~~~~~~~~~~ strerror net.c:333:47: 警告:传递‘__redisSetError’的第 3 个参数时将整数赋给指针,未作类型转换 [-Wint-conversion] net.c:58:6: 附注:需要类型‘const char *’,但实参的类型为‘int’ void __redisSetError(redisContext *c, int type, const char *str); ^~~~~~~~~~~~~~~ net.c:337:40: 错误:dereferencing pointer to incomplete type ‘struct addrinfo’ for (p = servinfo; p != NULL; p = p->ai_next) { ^~ net.c:350:60: 警告:格式 ‘%s’ expects argument of type ‘char *’, but argument 4 has type ‘int’ [-Wformat=] snprintf(buf,sizeof(buf),"Can't get addr: %s",gai_strerror(rv)); ~^ ~~~~~~~~~~~~~~~~ %d net.c:369:13: 警告:隐式声明函数‘freeaddrinfo’ [-Wimplicit-function-declaration] freeaddrinfo(bservinfo); ^~~~~~~~~~~~ net.c:270:21: 警告:未使用的变量‘hints’ [-Wunused-variable] struct addrinfo hints, *servinfo, *bservinfo, *p, *b; ^~~~~ net.c: 在函数‘redisContextConnectUnix’中: net.c:441:27: 警告:赋值时将整数赋给指针,未作类型转换 [-Wint-conversion] c->unix_sock.path = strdup(path); ^ make: *** [Makefile:156:net.o] 错误 1
发布于4年前 · 0 次浏览 · 来自
提问
都
都市浮云
lgy@DESKTOP-V8NEBLS /home/redis-stable/deps/hiredis $ make cc -std=c99 -pedantic -c -O3 -fPIC -Wall -W -Wstrict-prototypes -Wwrite-strings -g -ggdb net.c In file included from net.h:38:0, from net.c:54: net.c: 在函数‘__redisSetErrorFromErrno’中: hiredis.h:90:9: 警告:implicit declaration of function ‘strerror_r’; did you mean ‘_strerror_r’? [-Wimplicit-function-declaration] strerror_r((errno), (buf), (len)); \ ^ net.c:73:5: 附注:in expansion of macro ‘__redis_strerror_r’ __redis_strerror_r(errno, (char *)(buf + len), sizeof(buf) - len); ^~~~~~~~~~~~~~~~~~ net.c: 在函数‘_redisContextConnectTcp’中: net.c:270:21: 错误:‘hints’的存储大小未知 struct addrinfo hints, *servinfo, *bservinfo, *p, *b; ^~~~~ net.c:291:23: 警告:implicit declaration of function ‘strdup’; did you mean ‘sdsdup’? [-Wimplicit-function-declaration] c->tcp.host = strdup(addr); ^~~~~~ sdsdup net.c:291:21: 警告:赋值时将整数赋给指针,未作类型转换 [-Wint-conversion] c->tcp.host = strdup(addr); ^ net.c:317:28: 警告:赋值时将整数赋给指针,未作类型转换 [-Wint-conversion] c->tcp.source_addr = strdup(source_addr); ^ net.c:330:15: 警告:隐式声明函数‘getaddrinfo’ [-Wimplicit-function-declaration] if ((rv = getaddrinfo(c->tcp.host,_port,&hints,&servinfo)) != 0) { ^~~~~~~~~~~ net.c:333:47: 警告:implicit declaration of function ‘gai_strerror’; did you mean ‘strerror’? [-Wimplicit-function-declaration] __redisSetError(c,REDIS_ERR_OTHER,gai_strerror(rv)); ^~~~~~~~~~~~ strerror net.c:333:47: 警告:传递‘__redisSetError’的第 3 个参数时将整数赋给指针,未作类型转换 [-Wint-conversion] net.c:58:6: 附注:需要类型‘const char *’,但实参的类型为‘int’ void __redisSetError(redisContext *c, int type, const char *str); ^~~~~~~~~~~~~~~ net.c:337:40: 错误:dereferencing pointer to incomplete type ‘struct addrinfo’ for (p = servinfo; p != NULL; p = p->ai_next) { ^~ net.c:350:60: 警告:格式 ‘%s’ expects argument of type ‘char *’, but argument 4 has type ‘int’ [-Wformat=] snprintf(buf,sizeof(buf),"Can't get addr: %s",gai_strerror(rv)); ~^ ~~~~~~~~~~~~~~~~ %d net.c:369:13: 警告:隐式声明函数‘freeaddrinfo’ [-Wimplicit-function-declaration] freeaddrinfo(bservinfo); ^~~~~~~~~~~~ net.c:270:21: 警告:未使用的变量‘hints’ [-Wunused-variable] struct addrinfo hints, *servinfo, *bservinfo, *p, *b; ^~~~~ net.c: 在函数‘redisContextConnectUnix’中: net.c:441:27: 警告:赋值时将整数赋给指针,未作类型转换 [-Wint-conversion] c->unix_sock.path = strdup(path); ^ make: *** [Makefile:156:net.o] 错误 1
赞
0
分享
收藏
提问
分享
讨论
建议
公告
开发框架
CodeGalaxy
评论
2019-12-26
蕃
蕃薯
问题补充
赞
0
回复
微信公众号
热门内容
暂无回复的问答
- CodeGalaxy K3s 轻量集群节点之间如何实现负载均衡
- 关于openssl CURL WARNING swSSL_connect: SSL_connect(fd=69) failed. Error: error:141A318A:SSL routines:tls_process_ske_dhe:dh key too small[1|394]
- 多个模型如何进行事务异常回退?
- websocket开启wss报错
- 协程tcp服务器如何使用多进程?recv()方法接收信息,打印出来的pid一直是同一个。没用使用到多进程啊。