cumulus13 / memcached

Automatically exported from code.google.com/p/memcached
0 stars 0 forks source link

1.4.17: -Werror and "comparison between signed and unsigned integer expressions" #353

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
configure.ac from memcached 1.4.17 adds -Werror to CFLAGS, when the compiler is 
GCC.  This breaks the build with (GCC) 4.8.3 20131226 (prerelease), as it 
reports the following warnings.  In config.site I set

export CFLAGS='-pipe -O3 -flto -Wl,-S -Wl,--hash-style=gnu -Wl,-O1 -Wl,-z,relro 
-Wall -Wextra'

so the effective compiler flags are -Wextra -Werror:

memcached.c: In function ‘maxconns_handler’:
memcached.c:128:56: warning: unused parameter ‘which’ [-Wunused-parameter]
 static void maxconns_handler(const int fd, const short which, void *arg) {
                                                        ^
memcached.c:128:69: warning: unused parameter ‘arg’ [-Wunused-parameter]
 static void maxconns_handler(const int fd, const short which, void *arg) {
                                                                     ^
memcached.c: In function ‘out_string’:
memcached.c:835:19: warning: comparison between signed and unsigned integer 
expressions [-Wsign-compare]
     if ((len + 2) > c->wsize) {
                   ^
memcached.c: In function ‘add_bin_header’:
memcached.c:974:25: warning: comparison between signed and unsigned integer 
expressions [-Wsign-compare]
         for (ii = 0; ii < sizeof(header->bytes); ++ii) {
                         ^
memcached.c: In function ‘complete_incr_bin’:
memcached.c:1082:23: warning: comparison between signed and unsigned integer 
expressions [-Wsign-compare]
         for (i = 0; i < nkey; i++) {
                       ^
memcached.c: In function ‘process_bin_touch’:
memcached.c:1237:25: warning: comparison between signed and unsigned integer 
expressions [-Wsign-compare]
         for (ii = 0; ii < nkey; ++ii) {
                         ^
memcached.c: In function ‘process_bin_get’:
memcached.c:1326:25: warning: comparison between signed and unsigned integer 
expressions [-Wsign-compare]
         for (ii = 0; ii < nkey; ++ii) {
                         ^
memcached.c: In function ‘append_bin_stats’:
memcached.c:1405:9: warning: missing initializer for field ‘opcode’ of 
‘struct <anonymous>’ [-Wmissing-field-initializers]
         .response.opcode = PROTOCOL_BINARY_CMD_STAT,
         ^
In file included from memcached.h:21:0,
                 from memcached.c:16:
protocol_binary.h:173:21: note: ‘opcode’ declared here
             uint8_t opcode;
                     ^
memcached.c:1406:9: warning: missing initializer for field ‘keylen’ of 
‘struct <anonymous>’ [-Wmissing-field-initializers]
         .response.keylen = (uint16_t)htons(klen),
         ^
In file included from memcached.h:21:0,
                 from memcached.c:16:
protocol_binary.h:174:22: note: ‘keylen’ declared here
             uint16_t keylen;
                      ^
memcached.c:1407:9: warning: missing initializer for field ‘extlen’ of 
‘struct <anonymous>’ [-Wmissing-field-initializers]
         .response.datatype = (uint8_t)PROTOCOL_BINARY_RAW_BYTES,
         ^
In file included from memcached.h:21:0,
                 from memcached.c:16:
protocol_binary.h:175:21: note: ‘extlen’ declared here
             uint8_t extlen;
                     ^
memcached.c:1408:9: warning: missing initializer for field ‘status’ of 
‘struct <anonymous>’ [-Wmissing-field-initializers]
         .response.bodylen = htonl(bodylen),
         ^
In file included from memcached.h:21:0,
                 from memcached.c:16:
protocol_binary.h:177:22: note: ‘status’ declared here
             uint16_t status;
                      ^
memcached.c:1409:9: warning: missing initializer for field ‘opaque’ of 
‘struct <anonymous>’ [-Wmissing-field-initializers]
         .response.opaque = c->opaque
         ^
In file included from memcached.h:21:0,
                 from memcached.c:16:
protocol_binary.h:179:22: note: ‘opaque’ declared here
             uint32_t opaque;
                      ^
memcached.c:1410:5: warning: missing initializer for field ‘cas’ of 
‘struct <anonymous>’ [-Wmissing-field-initializers]
     };
     ^
In file included from memcached.h:21:0,
                 from memcached.c:16:
protocol_binary.h:180:22: note: ‘cas’ declared here
             uint64_t cas;
                      ^
memcached.c: In function ‘process_bin_stat’:
memcached.c:1514:25: warning: comparison between signed and unsigned integer 
expressions [-Wsign-compare]
         for (ii = 0; ii < nkey; ++ii) {
                         ^
memcached.c: In function ‘bin_read_key’:
memcached.c:1588:19: warning: comparison between signed and unsigned integer 
expressions [-Wsign-compare]
         if (nsize != c->rsize) {
                   ^
memcached.c: In function ‘dispatch_bin_command’:
memcached.c:1903:40: warning: comparison between signed and unsigned integer 
expressions [-Wsign-compare]
             if (keylen == 0 && bodylen == extlen && (extlen == 0 || extlen == 4)) {
                                        ^
memcached.c:1919:55: warning: comparison between signed and unsigned integer 
expressions [-Wsign-compare]
             if (extlen == 8 && keylen != 0 && bodylen >= (keylen + 8)) {
                                                       ^
memcached.c:1929:40: warning: comparison between signed and unsigned integer 
expressions [-Wsign-compare]
             if (extlen == 0 && bodylen == keylen && keylen > 0) {
                                        ^
memcached.c:1936:54: warning: comparison between signed and unsigned integer 
expressions [-Wsign-compare]
             if (keylen > 0 && extlen == 0 && bodylen == keylen) {
                                                      ^
memcached.c:1944:55: warning: comparison between signed and unsigned integer 
expressions [-Wsign-compare]
             if (keylen > 0 && extlen == 20 && bodylen == (keylen + extlen)) {
                                                       ^
memcached.c: In function ‘process_bin_delete’:
memcached.c:2195:25: warning: comparison between signed and unsigned integer 
expressions [-Wsign-compare]
         for (ii = 0; ii < nkey; ++ii) {
                         ^
memcached.c: In function ‘process_get_command’:
memcached.c:2755:73: warning: parameter ‘ntokens’ set but not used 
[-Wunused-but-set-parameter]
 static inline void process_get_command(conn *c, token_t *tokens, size_t ntokens, bool return_cas) {
                                                                         ^
memcached.c: In function ‘do_add_delta’:
memcached.c:3147:18: warning: comparison between signed and unsigned integer 
expressions [-Wsign-compare]
         if(delta > value) {
                  ^
memcached.c: In function ‘try_read_command’:
memcached.c:3497:23: warning: comparison between signed and unsigned integer 
expressions [-Wsign-compare]
         if (c->rbytes < sizeof(c->binary_header)) {
                       ^
memcached.c:3518:33: warning: comparison between signed and unsigned integer 
expressions [-Wsign-compare]
                 for (ii = 0; ii < sizeof(req->bytes); ++ii) {
                                 ^
memcached.c: In function ‘transmit’:
memcached.c:3797:45: warning: comparison between signed and unsigned integer 
expressions [-Wsign-compare]
             while (m->msg_iovlen > 0 && res >= m->msg_iov->iov_len) {
                                             ^
memcached.c: In function ‘drive_machine’:
memcached.c:3894:55: warning: comparison between signed and unsigned integer 
expressions [-Wsign-compare]
                 stats.curr_conns + stats.reserved_fds >= settings.maxconns - 1) {
                                                       ^
memcached.c: In function ‘clock_handler’:
memcached.c:4527:37: warning: unused parameter ‘fd’ [-Wunused-parameter]
 static void clock_handler(const int fd, const short which, void *arg) {
                                     ^
memcached.c:4527:53: warning: unused parameter ‘which’ [-Wunused-parameter]
 static void clock_handler(const int fd, const short which, void *arg) {
                                                     ^
memcached.c:4527:66: warning: unused parameter ‘arg’ [-Wunused-parameter]
 static void clock_handler(const int fd, const short which, void *arg) {
                                                                  ^
memcached.c: In function ‘sig_handler’:
memcached.c:4761:35: warning: unused parameter ‘sig’ [-Wunused-parameter]
 static void sig_handler(const int sig) {
                                   ^
memcached.c: In function ‘main’:
memcached.c:5384:47: warning: comparison between signed and unsigned integer 
expressions [-Wsign-compare]
     if (stats.curr_conns + stats.reserved_fds >= settings.maxconns - 1) {
                                               ^
slabs.c: In function ‘split_slab_page_into_freelist’:
slabs.c:189:19: warning: comparison between signed and unsigned integer 
expressions [-Wsign-compare]
     for (x = 0; x < p->perslab; x++) {
                   ^
slabs.c: In function ‘do_slabs_newslab’:
slabs.c:198:9: warning: signed and unsigned type in conditional expression 
[-Wsign-compare]
         : p->size * p->perslab;
         ^
slabs.c: In function ‘do_slabs_alloc’:
slabs.c:225:35: warning: comparison between signed and unsigned integer 
expressions [-Wsign-compare]
     if (id < POWER_SMALLEST || id > power_largest) {
                                   ^
slabs.c: In function ‘do_slabs_free’:
slabs.c:263:35: warning: comparison between signed and unsigned integer 
expressions [-Wsign-compare]
     if (id < POWER_SMALLEST || id > power_largest)
                                   ^
slabs.c: In function ‘slabs_adjust_mem_requested’:
slabs.c:425:35: warning: comparison between signed and unsigned integer 
expressions [-Wsign-compare]
     if (id < POWER_SMALLEST || id > power_largest) {
                                   ^
slabs.c: In function ‘slab_maintenance_thread’:
slabs.c:715:44: warning: unused parameter ‘arg’ [-Wunused-parameter]
 static void *slab_maintenance_thread(void *arg) {
                                            ^
slabs.c: In function ‘slab_rebalance_thread’:
slabs.c:737:42: warning: unused parameter ‘arg’ [-Wunused-parameter]
 static void *slab_rebalance_thread(void *arg) {
                                          ^
items.c: In function ‘do_item_get’:
items.c:548:25: warning: comparison between signed and unsigned integer 
expressions [-Wsign-compare]
         for (ii = 0; ii < nkey; ++ii) {
                         ^
assoc.c: In function ‘assoc_maintenance_thread’:
assoc.c:204:45: warning: unused parameter ‘arg’ [-Wunused-parameter]
 static void *assoc_maintenance_thread(void *arg) {
                                             ^
thread.c: In function ‘thread_libevent_process’:
thread.c:394:51: warning: unused parameter ‘which’ [-Wunused-parameter]
 static void thread_libevent_process(int fd, short which, void *arg) {
                                                   ^
thread.c: In function ‘thread_init’:
thread.c:812:19: warning: comparison between signed and unsigned integer 
expressions [-Wsign-compare]
     for (i = 0; i < item_lock_count; i++) {
                   ^
cache.c: In function ‘cache_create’:
cache.c:19:64: warning: unused parameter ‘align’ [-Wunused-parameter]
 cache_t* cache_create(const char *name, size_t bufsize, size_t align,
                                                                ^
sasl_defs.c: In function ‘sasl_log’:
sasl_defs.c:112:27: warning: unused parameter ‘context’ [-Wunused-parameter]
 static int sasl_log(void *context, int level, const char *message)
                           ^
memcached.c: In function ‘maxconns_handler’:
memcached.c:128:56: warning: unused parameter ‘which’ [-Wunused-parameter]
 static void maxconns_handler(const int fd, const short which, void *arg) {
                                                        ^
memcached.c:128:69: warning: unused parameter ‘arg’ [-Wunused-parameter]
 static void maxconns_handler(const int fd, const short which, void *arg) {
                                                                     ^
memcached.c: In function ‘out_string’:
memcached.c:835:19: warning: comparison between signed and unsigned integer 
expressions [-Wsign-compare]
     if ((len + 2) > c->wsize) {
                   ^
memcached.c: In function ‘add_bin_header’:
memcached.c:974:25: warning: comparison between signed and unsigned integer 
expressions [-Wsign-compare]
         for (ii = 0; ii < sizeof(header->bytes); ++ii) {
                         ^
In file included from memcached.c:45:0:
memcached.c: In function ‘complete_incr_bin’:
memcached.c:1069:21: warning: comparison between signed and unsigned integer 
expressions [-Wsign-compare]
     assert(c->wsize >= sizeof(*rsp));
                     ^
memcached.c:1082:23: warning: comparison between signed and unsigned integer 
expressions [-Wsign-compare]
         for (i = 0; i < nkey; i++) {
                       ^
memcached.c: In function ‘process_bin_touch’:
memcached.c:1237:25: warning: comparison between signed and unsigned integer 
expressions [-Wsign-compare]
         for (ii = 0; ii < nkey; ++ii) {
                         ^
memcached.c: In function ‘process_bin_get’:
memcached.c:1326:25: warning: comparison between signed and unsigned integer 
expressions [-Wsign-compare]
         for (ii = 0; ii < nkey; ++ii) {
                         ^
memcached.c: In function ‘append_bin_stats’:
memcached.c:1405:9: warning: missing initializer for field ‘opcode’ of 
‘struct <anonymous>’ [-Wmissing-field-initializers]
         .response.opcode = PROTOCOL_BINARY_CMD_STAT,
         ^
In file included from memcached.h:21:0,
                 from memcached.c:16:
protocol_binary.h:173:21: note: ‘opcode’ declared here
             uint8_t opcode;
                     ^
memcached.c:1406:9: warning: missing initializer for field ‘keylen’ of 
‘struct <anonymous>’ [-Wmissing-field-initializers]
         .response.keylen = (uint16_t)htons(klen),
         ^
In file included from memcached.h:21:0,
                 from memcached.c:16:
protocol_binary.h:174:22: note: ‘keylen’ declared here
             uint16_t keylen;
                      ^
memcached.c:1407:9: warning: missing initializer for field ‘extlen’ of 
‘struct <anonymous>’ [-Wmissing-field-initializers]
         .response.datatype = (uint8_t)PROTOCOL_BINARY_RAW_BYTES,
         ^
In file included from memcached.h:21:0,
                 from memcached.c:16:
protocol_binary.h:175:21: note: ‘extlen’ declared here
             uint8_t extlen;
                     ^
memcached.c:1408:9: warning: missing initializer for field ‘status’ of 
‘struct <anonymous>’ [-Wmissing-field-initializers]
         .response.bodylen = htonl(bodylen),
         ^
In file included from memcached.h:21:0,
                 from memcached.c:16:
protocol_binary.h:177:22: note: ‘status’ declared here
             uint16_t status;
                      ^
memcached.c:1409:9: warning: missing initializer for field ‘opaque’ of 
‘struct <anonymous>’ [-Wmissing-field-initializers]
         .response.opaque = c->opaque
         ^
In file included from memcached.h:21:0,
                 from memcached.c:16:
protocol_binary.h:179:22: note: ‘opaque’ declared here
             uint32_t opaque;
                      ^
memcached.c:1410:5: warning: missing initializer for field ‘cas’ of 
‘struct <anonymous>’ [-Wmissing-field-initializers]
     };
     ^
In file included from memcached.h:21:0,
                 from memcached.c:16:
protocol_binary.h:180:22: note: ‘cas’ declared here
             uint64_t cas;
                      ^
memcached.c: In function ‘process_bin_stat’:
memcached.c:1514:25: warning: comparison between signed and unsigned integer 
expressions [-Wsign-compare]
         for (ii = 0; ii < nkey; ++ii) {
                         ^
memcached.c: In function ‘bin_read_key’:
memcached.c:1588:19: warning: comparison between signed and unsigned integer 
expressions [-Wsign-compare]
         if (nsize != c->rsize) {
                   ^
memcached.c: In function ‘dispatch_bin_command’:
memcached.c:1903:40: warning: comparison between signed and unsigned integer 
expressions [-Wsign-compare]
             if (keylen == 0 && bodylen == extlen && (extlen == 0 || extlen == 4)) {
                                        ^
memcached.c:1919:55: warning: comparison between signed and unsigned integer 
expressions [-Wsign-compare]
             if (extlen == 8 && keylen != 0 && bodylen >= (keylen + 8)) {
                                                       ^
memcached.c:1929:40: warning: comparison between signed and unsigned integer 
expressions [-Wsign-compare]
             if (extlen == 0 && bodylen == keylen && keylen > 0) {
                                        ^
memcached.c:1936:54: warning: comparison between signed and unsigned integer 
expressions [-Wsign-compare]
             if (keylen > 0 && extlen == 0 && bodylen == keylen) {
                                                      ^
memcached.c:1944:55: warning: comparison between signed and unsigned integer 
expressions [-Wsign-compare]
             if (keylen > 0 && extlen == 20 && bodylen == (keylen + extlen)) {
                                                       ^
memcached.c: In function ‘process_bin_delete’:
memcached.c:2195:25: warning: comparison between signed and unsigned integer 
expressions [-Wsign-compare]
         for (ii = 0; ii < nkey; ++ii) {
                         ^
memcached.c: In function ‘process_get_command’:
memcached.c:2755:73: warning: parameter ‘ntokens’ set but not used 
[-Wunused-but-set-parameter]
 static inline void process_get_command(conn *c, token_t *tokens, size_t ntokens, bool return_cas) {
                                                                         ^
memcached.c: In function ‘do_add_delta’:
memcached.c:3147:18: warning: comparison between signed and unsigned integer 
expressions [-Wsign-compare]
         if(delta > value) {
                  ^
memcached.c: In function ‘try_read_command’:
memcached.c:3497:23: warning: comparison between signed and unsigned integer 
expressions [-Wsign-compare]
         if (c->rbytes < sizeof(c->binary_header)) {
                       ^
memcached.c:3518:33: warning: comparison between signed and unsigned integer 
expressions [-Wsign-compare]
                 for (ii = 0; ii < sizeof(req->bytes); ++ii) {
                                 ^
memcached.c: In function ‘transmit’:
memcached.c:3797:45: warning: comparison between signed and unsigned integer 
expressions [-Wsign-compare]
             while (m->msg_iovlen > 0 && res >= m->msg_iov->iov_len) {
                                             ^
memcached.c: In function ‘drive_machine’:
memcached.c:3894:55: warning: comparison between signed and unsigned integer 
expressions [-Wsign-compare]
                 stats.curr_conns + stats.reserved_fds >= settings.maxconns - 1) {
                                                       ^
memcached.c: In function ‘clock_handler’:
memcached.c:4527:37: warning: unused parameter ‘fd’ [-Wunused-parameter]
 static void clock_handler(const int fd, const short which, void *arg) {
                                     ^
memcached.c:4527:53: warning: unused parameter ‘which’ [-Wunused-parameter]
 static void clock_handler(const int fd, const short which, void *arg) {
                                                     ^
memcached.c:4527:66: warning: unused parameter ‘arg’ [-Wunused-parameter]
 static void clock_handler(const int fd, const short which, void *arg) {
                                                                  ^
memcached.c: In function ‘sig_handler’:
memcached.c:4761:35: warning: unused parameter ‘sig’ [-Wunused-parameter]
 static void sig_handler(const int sig) {
                                   ^
memcached.c: In function ‘main’:
memcached.c:5384:47: warning: comparison between signed and unsigned integer 
expressions [-Wsign-compare]
     if (stats.curr_conns + stats.reserved_fds >= settings.maxconns - 1) {
                                               ^
slabs.c: In function ‘split_slab_page_into_freelist’:
slabs.c:189:19: warning: comparison between signed and unsigned integer 
expressions [-Wsign-compare]
     for (x = 0; x < p->perslab; x++) {
                   ^
slabs.c: In function ‘do_slabs_newslab’:
slabs.c:198:9: warning: signed and unsigned type in conditional expression 
[-Wsign-compare]
         : p->size * p->perslab;
         ^
slabs.c: In function ‘do_slabs_alloc’:
slabs.c:225:35: warning: comparison between signed and unsigned integer 
expressions [-Wsign-compare]
     if (id < POWER_SMALLEST || id > power_largest) {
                                   ^
In file included from slabs.c:21:0:
slabs.c: In function ‘do_slabs_free’:
slabs.c:262:39: warning: comparison between signed and unsigned integer 
expressions [-Wsign-compare]
     assert(id >= POWER_SMALLEST && id <= power_largest);
                                       ^
slabs.c:263:35: warning: comparison between signed and unsigned integer 
expressions [-Wsign-compare]
     if (id < POWER_SMALLEST || id > power_largest)
                                   ^
slabs.c: In function ‘slabs_adjust_mem_requested’:
slabs.c:425:35: warning: comparison between signed and unsigned integer 
expressions [-Wsign-compare]
     if (id < POWER_SMALLEST || id > power_largest) {
                                   ^
slabs.c: In function ‘slab_maintenance_thread’:
slabs.c:715:44: warning: unused parameter ‘arg’ [-Wunused-parameter]
 static void *slab_maintenance_thread(void *arg) {
                                            ^
slabs.c: In function ‘slab_rebalance_thread’:
slabs.c:737:42: warning: unused parameter ‘arg’ [-Wunused-parameter]
 static void *slab_rebalance_thread(void *arg) {
                                          ^
items.c: In function ‘do_item_get’:
items.c:548:25: warning: comparison between signed and unsigned integer 
expressions [-Wsign-compare]
         for (ii = 0; ii < nkey; ++ii) {
                         ^
assoc.c: In function ‘assoc_maintenance_thread’:
assoc.c:204:45: warning: unused parameter ‘arg’ [-Wunused-parameter]
 static void *assoc_maintenance_thread(void *arg) {
                                             ^
thread.c: In function ‘thread_libevent_process’:
thread.c:394:51: warning: unused parameter ‘which’ [-Wunused-parameter]
 static void thread_libevent_process(int fd, short which, void *arg) {
                                                   ^
thread.c: In function ‘thread_init’:
thread.c:812:19: warning: comparison between signed and unsigned integer 
expressions [-Wsign-compare]
     for (i = 0; i < item_lock_count; i++) {
                   ^
cache.c: In function ‘cache_create’:
cache.c:19:64: warning: unused parameter ‘align’ [-Wunused-parameter]
 cache_t* cache_create(const char *name, size_t bufsize, size_t align,
                                                                ^
sasl_defs.c: In function ‘sasl_log’:
sasl_defs.c:112:27: warning: unused parameter ‘context’ [-Wunused-parameter]
 static int sasl_log(void *context, int level, const char *message)
                           ^
memcached.c: In function ‘process_command’:
memcached.c:2725:23: warning: ‘bytes’ may be used uninitialized in this 
function [-Wmaybe-uninitialized]
         write_and_free(c, buf, bytes);
                       ^
sizes.c: In function ‘main’:
sizes.c:9:14: warning: unused parameter ‘argc’ [-Wunused-parameter]
 int main(int argc, char **argv) {
              ^
sizes.c:9:27: warning: unused parameter ‘argv’ [-Wunused-parameter]
 int main(int argc, char **argv) {
                           ^
testapp.c: In function ‘cache_constructor’:
testapp.c:46:50: warning: unused parameter ‘notused1’ [-Wunused-parameter]
 static int cache_constructor(void *buffer, void *notused1, int notused2) {
                                                  ^
testapp.c:46:64: warning: unused parameter ‘notused2’ [-Wunused-parameter]
 static int cache_constructor(void *buffer, void *notused1, int notused2) {
                                                                ^
testapp.c: In function ‘cache_fail_constructor’:
testapp.c:64:41: warning: unused parameter ‘buffer’ [-Wunused-parameter]
 static int cache_fail_constructor(void *buffer, void *notused1, int notused2) {
                                         ^
testapp.c:64:55: warning: unused parameter ‘notused1’ [-Wunused-parameter]
 static int cache_fail_constructor(void *buffer, void *notused1, int notused2) {
                                                       ^
testapp.c:64:69: warning: unused parameter ‘notused2’ [-Wunused-parameter]
 static int cache_fail_constructor(void *buffer, void *notused1, int notused2) {
                                                                     ^
testapp.c: In function ‘cache_destructor’:
testapp.c:85:50: warning: unused parameter ‘notused’ [-Wunused-parameter]
 static void cache_destructor(void *buffer, void *notused) {
                                                  ^
testapp.c: In function ‘send_ascii_command’:
testapp.c:533:21: warning: comparison between signed and unsigned integer 
expressions [-Wsign-compare]
     } while (offset < len);
                     ^
In file included from testapp.c:15:0:
testapp.c: In function ‘read_ascii_response’:
testapp.c:559:31: warning: comparison between signed and unsigned integer 
expressions [-Wsign-compare]
             assert(offset + 1 < size);
                               ^
testapp.c: In function ‘safe_send’:
testapp.c:706:21: warning: comparison between signed and unsigned integer 
expressions [-Wsign-compare]
     } while (offset < len);
                     ^
testapp.c: In function ‘safe_recv’:
testapp.c:728:21: warning: comparison between signed and unsigned integer 
expressions [-Wsign-compare]
     } while (offset < len);
                     ^
In file included from testapp.c:15:0:
testapp.c: In function ‘test_binary_incr_impl’:
testapp.c:1361:64: warning: comparison between signed and unsigned integer 
expressions [-Wsign-compare]
             assert(ntohll(receive.response.message.body.value) == ii);
                                                                ^
testapp.c: In function ‘test_binary_decr_impl’:
testapp.c:1398:64: warning: comparison between signed and unsigned integer 
expressions [-Wsign-compare]
             assert(ntohll(receive.response.message.body.value) == ii);
                                                                ^
testapp.c: In function ‘binary_hickup_recv_verification_thread’:
testapp.c:1650:59: warning: unused parameter ‘arg’ [-Wunused-parameter]
 static void *binary_hickup_recv_verification_thread(void *arg) {
                                                           ^
testapp.c: In function ‘main’:
testapp.c:1937:14: warning: unused parameter ‘argc’ [-Wunused-parameter]
 int main(int argc, char **argv)
              ^
testapp.c:1937:27: warning: unused parameter ‘argv’ [-Wunused-parameter]
 int main(int argc, char **argv)
                           ^
cache.c: In function ‘cache_create’:
cache.c:19:64: warning: unused parameter ‘align’ [-Wunused-parameter]
 cache_t* cache_create(const char *name, size_t bufsize, size_t align,
                                                                ^

Original issue reported on code.google.com by Dilyan.P...@gmail.com on 3 Jan 2014 at 10:14

GoogleCodeExporter commented 9 years ago
Holy crap....

I don't see how Werror got turned on though? It doesn't appear to be in the 
commits for configure.ac anytime recently.

Or are you saying *you* did that and got all this?

I'd like to spend some time cleaning up warnings, but this is a bit much for 
now. I need the buildbots up before being able to reliably make those sorts of 
changes anyway.

Original comment by dorma...@rydia.net on 3 Jan 2014 at 11:15

GoogleCodeExporter commented 9 years ago
going to close this... I see -Werror on in my own builds and it's doing okay.

if people have more issues like this they can re-open. please include distro + 
gcc (and maybe not a pre-release version of gcc? I could never repro this)

Original comment by dorma...@rydia.net on 5 Jul 2015 at 1:15