Commit 820840ec authored by vysheng's avatar vysheng

Fixed some compilation errors

parent 1ceaa48b
#define _GNU_SOURCE #define _GNU_SOURCE
#include <readline/readline.h>
#include <readline/history.h>
#include <assert.h> #include <assert.h>
#include <stdio.h> #include <stdio.h>
#include <stdarg.h> #include <stdarg.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <readline/readline.h>
#include <readline/history.h>
#include "include.h" #include "include.h"
#include "queries.h" #include "queries.h"
......
...@@ -860,7 +860,8 @@ void work_packed (struct connection *c, long long msg_id) { ...@@ -860,7 +860,8 @@ void work_packed (struct connection *c, long long msg_id) {
char *s = fetch_str (l); char *s = fetch_str (l);
size_t dl = MAX_PACKED_SIZE; size_t dl = MAX_PACKED_SIZE;
z_stream strm = {0}; z_stream strm;
memset (&strm, 0, sizeof (strm));
assert (inflateInit2 (&strm, 16 + MAX_WBITS) == Z_OK); assert (inflateInit2 (&strm, 16 + MAX_WBITS) == Z_OK);
strm.avail_in = l; strm.avail_in = l;
strm.next_in = (void *)s; strm.next_in = (void *)s;
......
...@@ -123,7 +123,8 @@ void query_result (long long id UU) { ...@@ -123,7 +123,8 @@ void query_result (long long id UU) {
char *s = fetch_str (l); char *s = fetch_str (l);
size_t dl = MAX_PACKED_SIZE; size_t dl = MAX_PACKED_SIZE;
z_stream strm = {0}; z_stream strm;
memset (&strm, 0, sizeof (strm));
assert (inflateInit2 (&strm, 16 + MAX_WBITS) == Z_OK); assert (inflateInit2 (&strm, 16 + MAX_WBITS) == Z_OK);
strm.avail_in = l; strm.avail_in = l;
strm.next_in = (void *)s; strm.next_in = (void *)s;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment