sudoers plugin: silence most -Wconversion warnings.

This commit is contained in:
Todd C. Miller
2023-07-07 15:07:04 -06:00
parent 4891f37a45
commit a38b714667
58 changed files with 352 additions and 322 deletions

View File

@@ -253,7 +253,7 @@ sudo_ldap_extract_digest(const char *cmnd, char **endptr,
{
const char *ep, *cp = cmnd;
struct command_digest *digest;
int digest_type = SUDO_DIGEST_INVALID;
unsigned int digest_type = SUDO_DIGEST_INVALID;
debug_decl(sudo_ldap_extract_digest, SUDOERS_DEBUG_LDAP);
/*
@@ -671,7 +671,7 @@ sudo_ldap_value_cat(char *dst, const char *src, size_t size)
/* Find the end of dst and adjust bytes left but don't go past end */
while (n-- != 0 && *d != '\0')
d++;
dlen = d - dst;
dlen = (size_t)(d - dst);
n = size - dlen;
if (n == 0)
@@ -723,7 +723,7 @@ done:
*d = '\0';
while (*s != '\0')
s++;
return dlen + (s - src); /* count does not include NUL */
return dlen + (size_t)(s - src); /* count does not include NUL */
}
/*