From 717976ac237fff3cf7a4e95dd0c67950dfaf8e20 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Thu, 7 Dec 2017 17:35:11 +0100 Subject: [PATCH] s4:ntvfs: Fix size type in pvfs functions This fixes compilation with -Wstrict-overflow=2 Signed-off-by: Andreas Schneider Reviewed-by: Andrew Bartlett --- source4/ntvfs/posix/pvfs_resolve.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source4/ntvfs/posix/pvfs_resolve.c b/source4/ntvfs/posix/pvfs_resolve.c index 12fc0c1110b3..cc3d72c2ed66 100644 --- a/source4/ntvfs/posix/pvfs_resolve.c +++ b/source4/ntvfs/posix/pvfs_resolve.c @@ -62,10 +62,10 @@ static NTSTATUS pvfs_case_search(struct pvfs_state *pvfs, unsigned int flags) { /* break into a series of components */ - int num_components; + size_t num_components; char **components; char *p, *partial_name; - int i; + size_t i; /* break up the full name info pathname components */ num_components=2; @@ -389,7 +389,7 @@ static NTSTATUS pvfs_reduce_name(TALLOC_CTX *mem_ctx, { codepoint_t c; size_t c_size, len; - int i, num_components, err_count; + size_t i, num_components, err_count; char **components; char *p, *s, *ret; @@ -432,7 +432,7 @@ static NTSTATUS pvfs_reduce_name(TALLOC_CTX *mem_ctx, err_count++; } } - if (err_count) { + if (err_count > 0) { if (flags & PVFS_RESOLVE_WILDCARD) err_count--; if (err_count==1) { -- 2.34.1