ptr->number_of_replicas= (uint32_t)data;
break;
case MEMCACHED_BEHAVIOR_IO_MSG_WATERMARK:
- ptr->io_msg_watermark= (int32_t)data;
+ ptr->io_msg_watermark= (uint32_t) data;
break;
case MEMCACHED_BEHAVIOR_IO_BYTES_WATERMARK:
- ptr->io_bytes_watermark= (int32_t)data;
+ ptr->io_bytes_watermark= (uint32_t)data;
break;
case MEMCACHED_BEHAVIOR_IO_KEY_PREFETCH:
- ptr->io_key_prefetch = (int32_t)data;
+ ptr->io_key_prefetch = (uint32_t)data;
break;
case MEMCACHED_BEHAVIOR_SND_TIMEOUT:
ptr->snd_timeout= (int32_t)data;
ptr->distribution= (memcached_server_distribution)(data);
if (ptr->distribution == MEMCACHED_DISTRIBUTION_RANDOM)
{
- srandom(time(NULL));
+ srandom((uint32_t) time(NULL));
}
run_distribution(ptr);
break;
case MEMCACHED_BEHAVIOR_DISTRIBUTION:
return ptr->distribution;
case MEMCACHED_BEHAVIOR_KETAMA:
- return (ptr->distribution == MEMCACHED_DISTRIBUTION_CONSISTENT_KETAMA) ? 1 : 0;
+ return (ptr->distribution == MEMCACHED_DISTRIBUTION_CONSISTENT_KETAMA) ? (uint64_t) 1 : 0;
case MEMCACHED_BEHAVIOR_HASH:
return ptr->hash;
case MEMCACHED_BEHAVIOR_KETAMA_HASH:
SO_SNDBUF, &sock_size, &sock_length))
return 0; /* Zero means error */
- return sock_size;
+ return (uint64_t) sock_size;
}
case MEMCACHED_BEHAVIOR_SOCKET_RECV_SIZE:
{
SO_RCVBUF, &sock_size, &sock_length))
return 0; /* Zero means error */
- return sock_size;
+ return (uint64_t) sock_size;
}
case MEMCACHED_BEHAVIOR_USER_DATA:
return MEMCACHED_FAILURE;