lib:param: Fix the size type in lp_do_parameter_parametric()
authorAndreas Schneider <asn@samba.org>
Wed, 21 Mar 2018 10:26:55 +0000 (11:26 +0100)
committerJeremy Allison <jra@samba.org>
Thu, 22 Mar 2018 00:54:08 +0000 (01:54 +0100)
This fixes compilation with -Wstrict-overflow=2

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Mar 22 01:54:08 CET 2018 on sn-devel-144

lib/param/loadparm.c

index b46700dfb54b83725d41046795b57bbd6d5d7161..0c1b28babbc0fd0916ff4d7bfbe351808fff8cbb 100644 (file)
@@ -1598,7 +1598,7 @@ static bool lp_do_parameter_parametric(struct loadparm_context *lp_ctx,
 static bool set_variable_helper(TALLOC_CTX *mem_ctx, int parmnum, void *parm_ptr,
                         const char *pszParmName, const char *pszParmValue)
 {
-       int i;
+       size_t i;
 
        /* switch on the type of variable it is */
        switch (parm_table[parmnum].type)