Skip to content

Commit 2e7c118

Browse files
committed
Fix clang warnings.
1 parent af2ba25 commit 2e7c118

4 files changed

Lines changed: 6 additions & 6 deletions

File tree

cups/auth.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -449,8 +449,8 @@ _cupsSetNegotiateAuthString(
449449
{
450450
// Allocate the authorization string since Windows KDCs can have
451451
// arbitrarily large credentials...
452-
int authsize = 10 + // "Negotiate "
453-
(((int)output_token.length * 4 / 3 + 3) & ~3) + 1;
452+
size_t authsize = (size_t)(10 + // "Negotiate "
453+
((output_token.length * 4 / 3 + 3) & ~3U) + 1);
454454
// Base64 + nul
455455

456456
httpSetAuthString(http, NULL, NULL);

cups/ipp-support.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2019,7 +2019,7 @@ ippCreateRequestedArray(ipp_t *request) // I - IPP request
20192019
}
20202020

20212021
// If the attribute contains a single "all" keyword, return NULL...
2022-
count = ippGetCount(requested);
2022+
count = (size_t)ippGetCount(requested);
20232023
if (count == 1 && !strcmp(ippGetString(requested, 0, NULL), "all"))
20242024
return (NULL);
20252025

cups/ipp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6042,7 +6042,7 @@ ipp_set_value(ipp_t *ipp, // IO - IPP message
60426042
if (temp->num_values <= 1)
60436043
alloc_values = 1;
60446044
else
6045-
alloc_values = (temp->num_values + IPP_MAX_VALUES - 1) & (size_t)~(IPP_MAX_VALUES - 1);
6045+
alloc_values = (temp->num_values + IPP_MAX_VALUES - 1) & ~(IPP_MAX_VALUES - 1);
60466046

60476047
if (element < alloc_values)
60486048
{

cups/tls-openssl.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ cupsAreCredentialsValidForName(
9696
STACK_OF(GENERAL_NAME) *names = NULL;
9797
// subjectAltName values
9898

99-
DEBUG_printf("1cupsAreCredentialsValidForName: certs=%p(num=%d), cert=%p", certs, sk_X509_num(certs), cert);
99+
DEBUG_printf("1cupsAreCredentialsValidForName: certs=%p(num=%d), cert=%p", (void *)certs, sk_X509_num(certs), (void *)cert);
100100

101101
X509_NAME_get_text_by_NID(X509_get_subject_name(cert), NID_commonName, subjectName, sizeof(subjectName));
102102
DEBUG_printf("1cupsAreCredentialsValidForName: subjectName=\"%s\"", subjectName);
@@ -116,7 +116,7 @@ cupsAreCredentialsValidForName(
116116
if (!result)
117117
{
118118
names = X509_get_ext_d2i(cert, NID_subject_alt_name, /*crit*/NULL, /*idx*/NULL);
119-
DEBUG_printf("1cupsAreCredentialsValidForName: names=%p", names);
119+
DEBUG_printf("1cupsAreCredentialsValidForName: names=%p", (void *)names);
120120
}
121121

122122
if (names)

0 commit comments

Comments
 (0)