Fixed warnings seen on FreeBSD.

master
Nicolas Favre-Felix 13 years ago
parent 741db1b0c0
commit 5385f9cbaa

@ -57,6 +57,7 @@ raw_ws_extract(struct http_client *c, const char *p, size_t sz) {
struct cmd *cmd = NULL;
void *reader = NULL;
redisReply *reply = NULL;
void **reply_ptr = (void**)&reply;
unsigned int i;
(void)c;
@ -67,7 +68,7 @@ raw_ws_extract(struct http_client *c, const char *p, size_t sz) {
redisReaderFeed(reader, (char*)p, sz);
/* parse data into reply object */
if(redisReaderGetReply(reader, (void**)&reply) == REDIS_ERR) {
if(redisReaderGetReply(reader, reply_ptr) == REDIS_ERR) {
goto end;
}

@ -8,6 +8,7 @@
#include <unistd.h>
#include <signal.h>
#include <string.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <fcntl.h>
#include <sys/types.h>

@ -265,6 +265,8 @@ ws_parse_data(const char *frame, size_t sz, struct ws_msg **msg) {
len = webdis_ntohl64(frame+2);
p = frame + 10 + (has_mask ? 4 : 0);
if(has_mask) memcpy(&mask, frame + 10, sizeof(mask));
} else {
return WS_ERROR;
}
/* we now have the (possibly masked) data starting in p, and its length. */
@ -317,7 +319,7 @@ ws_reply(struct cmd *cmd, const char *p, size_t sz) {
int ret;
char *frame = malloc(sz + 8); /* create frame by prepending header */
size_t frame_sz;
size_t frame_sz = 0;
/*
The length of the "Payload data", in bytes: if 0-125, that is the

Loading…
Cancel
Save