]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
heimdal: Fix size types
authorAndreas Schneider <asn@samba.org>
Thu, 7 Dec 2017 19:26:40 +0000 (20:26 +0100)
committerJeremy Allison <jra@samba.org>
Tue, 20 Mar 2018 22:16:14 +0000 (23:16 +0100)
This fixes compilation with -Wstrict-overflow=2

Upstream pull request:
https://github.com/heimdal/heimdal/pull/354

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
source4/heimdal/lib/asn1/gen.c
source4/heimdal/lib/hx509/cert.c
source4/heimdal/lib/krb5/config_file.c
source4/heimdal/lib/krb5/keytab_any.c
source4/heimdal/lib/roken/resolve.c

index fd833dbd76ffb694900fd65972823f5029d6b304..919a7076ac1254bef4887d48ac8e81a42548d396 100644 (file)
@@ -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:
index 329fc179cb559dc8ea1d62b316fa6b73078c80cd..190bdb48a4f496b4e943aa79d0a3f032e3babf00 100644 (file)
@@ -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;
index 4ac25ae28703bb47696fd26f473ffd96550ca64c..2748f481d66ceed3723db4cbd1eea85789f11e61 100644 (file)
@@ -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;
 
index d5ac4883db1018767dd4e11c2fd018d2ac9bbd21..568af0ac69e5238e49c11f233ea406402288677d 100644 (file)
@@ -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)
index 0cfe0b0472a2161a08d26124c022988e4b12b0a8..b719aebaf0d7594df700b91b019c3444c992fed7 100644 (file)
@@ -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)];