Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

all warnings ammeriolated

Change-Id: I48a1bfd4cddee16ce583280c21bd0fce3ae065c7
Reviewed-on: http://review.northscale.com/1749
Reviewed-by: Steve Yen <steve.yen@gmail.com>
Tested-by: Steve Yen <steve.yen@gmail.com>
  • Loading branch information...
commit d9eafd8fba159bd25a368bb72c3365a5aeb56a60 1 parent a5962cb
@steveyen steveyen authored
View
5 agent_ping.c
@@ -338,6 +338,11 @@ static void ping_server(char *server_name,
memcached_free(&mst);
}
+#else // !MOXI_USE_VBUCKET
+ (void) server_name;
+ (void) recipes;
+ (void) behavior;
+ (void) r;
#endif // !MOXI_USE_VBUCKET
}
View
4 agent_stats.c
@@ -186,6 +186,10 @@ void collect_memcached_stats_for_proxy(struct main_stats_collect_info *msci,
out_free:
memcached_free(&mst);
+#else // !MOXI_USE_VBUCKET
+ (void) msci;
+ (void) proxy_name;
+ (void) proxy_port;
#endif // !MOXI_USE_VBUCKET
}
View
2  cproxy_protocol_b.c
@@ -400,7 +400,7 @@ static void cproxy_sasl_plain_auth(conn *c, char *req_bytes) {
// back to some empty password proxy/bucket, such as to the
// default bucket.
//
- if (pwlen > 0 && pwlen < sizeof(password)) {
+ if (pwlen > 0 && pwlen < (int) sizeof(password)) {
memcpy(password, clientin + 2 + uslen, pwlen);
password[pwlen] = '\0';
View
10 mcs.c
@@ -153,6 +153,8 @@ void mcs_server_invalid_vbucket(mcs_st *ptr, int server_index, int vbucket) {
}
void mcs_server_st_quit(mcs_server_st *ptr, uint8_t io_death) {
+ (void) io_death;
+
// TODO: Should send QUIT cmd.
//
if (ptr->fd != -1) {
@@ -238,7 +240,7 @@ mcs_return mcs_server_st_do(mcs_server_st *ptr,
uint8_t with_flush) {
if (mcs_server_st_connect(ptr) == MEMCACHED_SUCCESS) {
ssize_t n = mcs_server_st_io_write(ptr, command, command_length, with_flush);
- if (n == command_length) {
+ if (n == (ssize_t) command_length) {
return MEMCACHED_SUCCESS;
}
}
@@ -250,6 +252,8 @@ ssize_t mcs_server_st_io_write(mcs_server_st *ptr,
const void *buffer,
size_t length,
char with_flush) {
+ (void) with_flush;
+
assert(ptr->fd != -1);
return write(ptr->fd, buffer, length);
@@ -271,7 +275,7 @@ mcs_return mcs_server_st_read(mcs_server_st *ptr,
size_t done = 0;
while (done < size) {
- size_t n = read(ptr->fd, data + done, size - done);
+ ssize_t n = read(ptr->fd, data + done, size - done);
if (n == -1) {
fcntl(ptr->fd, F_SETFL, flags);
return MEMCACHED_FAILURE;
@@ -285,6 +289,8 @@ mcs_return mcs_server_st_read(mcs_server_st *ptr,
}
void mcs_server_st_io_reset(mcs_server_st *ptr) {
+ (void) ptr;
+
// TODO: memcached_io_reset(ptr);
}
View
4 slabs.c
@@ -331,14 +331,14 @@ bool get_stats(const char *stat_type, int nkey, ADD_STAT add_stats, void *c) {
/*@null@*/
static void do_slabs_stats(ADD_STAT add_stats, void *c) {
- size_t i;
+ int i;
int total;
/* Get the per-thread stats which contain some interesting aggregates */
struct thread_stats thread_stats;
threadlocal_stats_aggregate(&thread_stats);
total = 0;
- for(i = POWER_SMALLEST; i <= power_largest; i++) {
+ for (i = POWER_SMALLEST; i <= (int) power_largest; i++) {
slabclass_t *p = &slabclass[i];
if (p->slabs != 0) {
uint32_t perslab, slabs;
Please sign in to comment.
Something went wrong with that request. Please try again.