]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Fix clang warnings.
authorMichael R Sweet <msweet@msweet.org>
Mon, 10 Nov 2025 20:13:33 +0000 (15:13 -0500)
committerMichael R Sweet <msweet@msweet.org>
Mon, 10 Nov 2025 20:15:22 +0000 (15:15 -0500)
cups/auth.c
cups/ipp-support.c
cups/ipp.c
cups/tls-openssl.c

index fc52a0cba1dbed9496b4d47046f4d6a27eb630ee..b29e998be6272c1e34a467764d19c1848a94fd97 100644 (file)
@@ -449,8 +449,8 @@ _cupsSetNegotiateAuthString(
   {
     // Allocate the authorization string since Windows KDCs can have
     // arbitrarily large credentials...
-    int authsize = 10 +                        // "Negotiate "
-                  (((int)output_token.length * 4 / 3 + 3) & ~3) + 1;
+    size_t authsize = (size_t)(10 +    // "Negotiate "
+                              ((output_token.length * 4 / 3 + 3) & ~3U) + 1);
                                        // Base64 + nul
 
     httpSetAuthString(http, NULL, NULL);
index 5d575b5b5274ac29da53f329b7697a070c877d5e..8ff8bc04e3eeecda514d14beec7612a279b42c83 100644 (file)
@@ -2019,7 +2019,7 @@ ippCreateRequestedArray(ipp_t *request)   // I - IPP request
   }
 
   // If the attribute contains a single "all" keyword, return NULL...
-  count = ippGetCount(requested);
+  count = (size_t)ippGetCount(requested);
   if (count == 1 && !strcmp(ippGetString(requested, 0, NULL), "all"))
     return (NULL);
 
index 844f273b4a565c44c6974a9d6530f7808f5a90d8..622e0c981e65ff6e20fe1f2579109b3783dbabf1 100644 (file)
@@ -6042,7 +6042,7 @@ ipp_set_value(ipp_t           *ipp,       // IO - IPP message
   if (temp->num_values <= 1)
     alloc_values = 1;
   else
-    alloc_values = (temp->num_values + IPP_MAX_VALUES - 1) & (size_t)~(IPP_MAX_VALUES - 1);
+    alloc_values = (temp->num_values + IPP_MAX_VALUES - 1) & ~(IPP_MAX_VALUES - 1);
 
   if (element < alloc_values)
   {
index 7e9e1414f02bde21c25ad8717c904f310b760a9f..b4a654841ba9643d53f9630f4846dc15a2994477 100644 (file)
@@ -96,7 +96,7 @@ cupsAreCredentialsValidForName(
     STACK_OF(GENERAL_NAME) *names = NULL;
                                        // subjectAltName values
 
-    DEBUG_printf("1cupsAreCredentialsValidForName: certs=%p(num=%d), cert=%p", certs, sk_X509_num(certs), cert);
+    DEBUG_printf("1cupsAreCredentialsValidForName: certs=%p(num=%d), cert=%p", (void *)certs, sk_X509_num(certs), (void *)cert);
 
     X509_NAME_get_text_by_NID(X509_get_subject_name(cert), NID_commonName, subjectName, sizeof(subjectName));
     DEBUG_printf("1cupsAreCredentialsValidForName: subjectName=\"%s\"", subjectName);
@@ -116,7 +116,7 @@ cupsAreCredentialsValidForName(
     if (!result)
     {
       names = X509_get_ext_d2i(cert, NID_subject_alt_name, /*crit*/NULL, /*idx*/NULL);
-      DEBUG_printf("1cupsAreCredentialsValidForName: names=%p", names);
+      DEBUG_printf("1cupsAreCredentialsValidForName: names=%p", (void *)names);
     }
 
     if (names)