1.1 --- a/src/pgp_sequoia.c Sat Dec 28 00:57:07 2019 +0100
1.2 +++ b/src/pgp_sequoia.c Sat Dec 28 11:58:32 2019 +0100
1.3 @@ -983,8 +983,8 @@
1.4 return PGP_STATUS_UNKNOWN_ERROR;
1.5 *our_free = free;
1.6
1.7 - int i, j;
1.8 - j = 0;
1.9 + size_t i;
1.10 + int j = 0;
1.11 for (i = 0; i < keyids_len; i ++) {
1.12 pgp_cert_t cert = NULL;
1.13 PEP_STATUS status
1.14 @@ -1019,7 +1019,7 @@
1.15
1.16 T("%zd PKESKs", pkesk_count);
1.17
1.18 - for (int i = 0; i < pkesk_count; i ++) {
1.19 + for (size_t i = 0; i < pkesk_count; i ++) {
1.20 pgp_pkesk_t pkesk = pkesks[i];
1.21 pgp_keyid_t keyid = pgp_pkesk_recipient(pkesk); /* Reference. */
1.22 char *keyid_str = pgp_keyid_to_hex(keyid);
1.23 @@ -1102,7 +1102,7 @@
1.24 }
1.25
1.26 // Consider wildcard recipients.
1.27 - if (wildcards) for (int i = 0; i < pkesk_count && !cookie->decrypted; i ++) {
1.28 + if (wildcards) for (size_t i = 0; i < pkesk_count && !cookie->decrypted; i ++) {
1.29 pgp_pkesk_t pkesk = pkesks[i];
1.30 pgp_keyid_t keyid = pgp_pkesk_recipient(pkesk); /* Reference. */
1.31 char *keyid_str = pgp_keyid_to_hex(keyid);
1.32 @@ -2598,13 +2598,13 @@
1.33 status = cert_find_by_fpr_hex(session, fpr, true, &cert, NULL);
1.34 ERROR_OUT(NULL, status, "Looking up '%s'", fpr);
1.35
1.36 - uint32_t creation_time = pgp_key_creation_time(pgp_cert_primary_key(cert));
1.37 + time_t creation_time = pgp_key_creation_time(pgp_cert_primary_key(cert));
1.38 if (creation_time > t)
1.39 // The creation time is after the expiration time!
1.40 ERROR_OUT(NULL, PEP_UNKNOWN_ERROR,
1.41 "creation time can't be after expiration time");
1.42
1.43 - uint32_t delta = t - creation_time;
1.44 + uint32_t delta = (uint32_t) (t - creation_time);
1.45
1.46
1.47 iter = pgp_cert_key_iter_valid(cert);
2.1 --- a/src/platform_windows.cpp Sat Dec 28 00:57:07 2019 +0100
2.2 +++ b/src/platform_windows.cpp Sat Dec 28 11:58:32 2019 +0100
2.3 @@ -384,7 +384,7 @@
2.4
2.5 const char* inner_big = retval + 1;
2.6 const char* curr_little = little + 1;
2.7 - int j;
2.8 + size_t j;
2.9 for (j = 1; j < little_len; j++, inner_big++, curr_little++) {
2.10 if (*inner_big != *curr_little) {
2.11 retval = NULL;