X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=libmemcached%2Fmemcached_flush.c;h=1011b3f18a3e908233254b7dac9089b9bf36c107;hb=6398f2c741d3571c9e792143017dcfec28d1c7df;hp=55a6ca716de10df28486015751548e3716c1dc01;hpb=70d4781acf107377fa194a04d05e8cf31fd211c8;p=m6w6%2Flibmemcached diff --git a/libmemcached/memcached_flush.c b/libmemcached/memcached_flush.c index 55a6ca71..1011b3f1 100644 --- a/libmemcached/memcached_flush.c +++ b/libmemcached/memcached_flush.c @@ -33,12 +33,12 @@ static memcached_return memcached_flush_textual(memcached_st *ptr, { bool no_reply= (ptr->flags & MEM_NOREPLY); if (expiration) - send_length= snprintf(buffer, MEMCACHED_DEFAULT_COMMAND_SIZE, - "flush_all %llu%s\r\n", - (unsigned long long)expiration, no_reply ? " noreply" : ""); + send_length= (size_t) snprintf(buffer, MEMCACHED_DEFAULT_COMMAND_SIZE, + "flush_all %llu%s\r\n", + (unsigned long long)expiration, no_reply ? " noreply" : ""); else - send_length= snprintf(buffer, MEMCACHED_DEFAULT_COMMAND_SIZE, - "flush_all%s\r\n", no_reply ? " noreply" : ""); + send_length= (size_t) snprintf(buffer, MEMCACHED_DEFAULT_COMMAND_SIZE, + "flush_all%s\r\n", no_reply ? " noreply" : ""); rc= memcached_do(&ptr->hosts[x], buffer, send_length, 1); @@ -63,7 +63,7 @@ static memcached_return memcached_flush_binary(memcached_st *ptr, request.message.header.request.extlen= 4; request.message.header.request.datatype= PROTOCOL_BINARY_RAW_BYTES; request.message.header.request.bodylen= htonl(request.message.header.request.extlen); - request.message.body.expiration= htonl(expiration); + request.message.body.expiration= htonl((uint32_t) expiration); for (x= 0; x < ptr->number_of_hosts; x++) {