From: Andreas Schneider Date: Thu, 7 Dec 2017 19:26:40 +0000 (+0100) Subject: heimdal: Fix size types X-Git-Tag: talloc-2.1.12~49 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=72979d1d60ca2eab1e7903c2e77b8cca69667691;p=thirdparty%2Fsamba.git heimdal: Fix size types This fixes compilation with -Wstrict-overflow=2 Upstream pull request: https://github.com/heimdal/heimdal/pull/354 Signed-off-by: Andreas Schneider Reviewed-by: Andrew Bartlett --- diff --git a/source4/heimdal/lib/asn1/gen.c b/source4/heimdal/lib/asn1/gen.c index fd833dbd76f..919a7076ac1 100644 --- a/source4/heimdal/lib/asn1/gen.c +++ b/source4/heimdal/lib/asn1/gen.c @@ -502,7 +502,7 @@ is_primitive_type(int type) } static void -space(int level) +space(size_t level) { while(level-- > 0) fprintf(headerfile, " "); @@ -531,7 +531,7 @@ have_ellipsis(Type *t) } static void -define_asn1 (int level, Type *t) +define_asn1 (size_t level, Type *t) { switch (t->type) { case TType: diff --git a/source4/heimdal/lib/hx509/cert.c b/source4/heimdal/lib/hx509/cert.c index 329fc179cb5..190bdb48a4f 100644 --- a/source4/heimdal/lib/hx509/cert.c +++ b/source4/heimdal/lib/hx509/cert.c @@ -1977,7 +1977,8 @@ hx509_verify_path(hx509_context context, { hx509_name_constraints nc; hx509_path path; - int ret, proxy_cert_depth, selfsigned_depth, diff; + int ret, diff; + size_t proxy_cert_depth, selfsigned_depth; size_t i, k; enum certtype type; Name proxy_issuer; diff --git a/source4/heimdal/lib/krb5/config_file.c b/source4/heimdal/lib/krb5/config_file.c index 4ac25ae2870..2748f481d66 100644 --- a/source4/heimdal/lib/krb5/config_file.c +++ b/source4/heimdal/lib/krb5/config_file.c @@ -925,7 +925,7 @@ krb5_config_vget_strings(krb5_context context, va_list args) { char **strings = NULL; - int nstr = 0; + size_t nstr = 0; const krb5_config_binding *b = NULL; const char *p; diff --git a/source4/heimdal/lib/krb5/keytab_any.c b/source4/heimdal/lib/krb5/keytab_any.c index d5ac4883db1..568af0ac69e 100644 --- a/source4/heimdal/lib/krb5/keytab_any.c +++ b/source4/heimdal/lib/krb5/keytab_any.c @@ -225,7 +225,7 @@ any_remove_entry(krb5_context context, { struct any_data *a = id->data; krb5_error_code ret; - int found = 0; + size_t found = 0; while(a != NULL) { ret = krb5_kt_remove_entry(context, a->kt, entry); if(ret == 0) diff --git a/source4/heimdal/lib/roken/resolve.c b/source4/heimdal/lib/roken/resolve.c index 0cfe0b0472a..b719aebaf0d 100644 --- a/source4/heimdal/lib/roken/resolve.c +++ b/source4/heimdal/lib/roken/resolve.c @@ -626,7 +626,7 @@ rk_dns_srv_order(struct rk_dns_reply *r) { struct rk_resource_record **srvs, **ss, **headp; struct rk_resource_record *rr; - int num_srv = 0; + size_t num_srv = 0; #if defined(HAVE_INITSTATE) && defined(HAVE_SETSTATE) int state[256 / sizeof(int)];