1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

s3:modules: Fix size types

error: assuming signed overflow does not occur when simplifying
conditional to constant [-Werror=strict-overflow]

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
This commit is contained in:
Andreas Schneider 2019-04-23 12:57:02 +02:00 committed by Andreas Schneider
parent f1bf02c78a
commit bd5b4a16c7

View File

@ -161,8 +161,8 @@ static int vfs_gluster_set_volfile_servers(glfs_t *fs,
const char *volfile_servers)
{
char *server = NULL;
int server_count = 0;
int server_success = 0;
size_t server_count = 0;
size_t server_success = 0;
int ret = -1;
TALLOC_CTX *frame = talloc_stackframe();
@ -174,7 +174,7 @@ static int vfs_gluster_set_volfile_servers(glfs_t *fs,
int port = 0;
server_count++;
DBG_INFO("server %d %s\n", server_count, server);
DBG_INFO("server %zu %s\n", server_count, server);
/* Determine the transport type */
if (strncmp(server, "unix+", 5) == 0) {
@ -251,7 +251,7 @@ out:
if (server_count == 0) {
ret = -1;
} else if (server_success < server_count) {
DBG_WARNING("Failed to set %d out of %d servers parsed\n",
DBG_WARNING("Failed to set %zu out of %zu servers parsed\n",
server_count - server_success, server_count);
ret = 0;
}