Permalink
Browse files

Remove compile warnings

Change-Id: I753e512e7669620cbaa33674df8c1fb3d6879efd
Reviewed-on: http://review.couchbase.org/19291
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
Tested-by: Matt Ingenthron <matt@couchbase.com>
  • Loading branch information...
trondn authored and ingenthr committed Aug 6, 2012
1 parent 26bc5f6 commit b9b0c33a1da1c73bd540749477e94232e487b7a5
Showing with 19 additions and 15 deletions.
  1. +16 −14 libmemc.c
  2. +3 −1 main.c
View
@@ -678,20 +678,22 @@ static int binary_store(struct Server *server,
}
protocol_binary_request_set request = {
- .message.header.request = {
- .magic = PROTOCOL_BINARY_REQ,
- .opcode = opcode,
- .keylen = htons(keylen),
- .extlen = 8,
- .datatype = 0,
- .vbucket = htons(get_vbucket(item->key, keylen)),
- .bodylen = htonl(keylen + item->size + 8),
- .opaque = 0,
- .cas = swap64(item->cas_id)
- },
- .message.body = {
- .flags = 0,
- .expiration = htonl(item->exptime)
+ .message = {
+ .header.request = {
+ .magic = PROTOCOL_BINARY_REQ,
+ .opcode = opcode,
+ .keylen = htons(keylen),
+ .extlen = 8,
+ .datatype = 0,
+ .vbucket = htons(get_vbucket(item->key, keylen)),
+ .bodylen = htonl(keylen + item->size + 8),
+ .opaque = 0,
+ .cas = swap64(item->cas_id)
+ },
+ .body = {
+ .flags = 0,
+ .expiration = htonl(item->exptime)
+ }
}
};
View
4 main.c
@@ -203,6 +203,7 @@ static void get_callback(libcouchbase_t instance,
const void *bytes, size_t nbytes,
uint32_t flags, uint64_t cas)
{
+ (void)instance;
(void)key;
(void)nkey;
(void)flags;
@@ -448,7 +449,7 @@ static inline bool memcached_get_wrapper(struct connection *connection,
libcouchbase_error_t e;
struct libcouchbase_callback cb;
char *keys[1];
- keys[0] = key;
+ keys[0] = (void*)key;
size_t nkeys[1];
nkeys[0] = nkey;
@@ -903,6 +904,7 @@ static int get_server_rusage(const struct host *entry, struct rusage *rusage)
static void exit_handler(int signum)
{
+ (void)signum;
long end_time = (int)time(NULL);
long time_taken = end_time - start_time;
long ops_sec = ((float)gets_count + sets_count) / time_taken;

0 comments on commit b9b0c33

Please sign in to comment.