]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Silence some bogus Clang warnings.
authorMichael R Sweet <michael.r.sweet@gmail.com>
Mon, 3 Sep 2018 13:30:08 +0000 (09:30 -0400)
committerMichael R Sweet <michael.r.sweet@gmail.com>
Mon, 3 Sep 2018 13:30:08 +0000 (09:30 -0400)
cups/ipp.c
cups/snmp.c
test/ipptool.c

index f30d8428f5637b316655b10472a63a2a78848e3e..afd85474d6bc0555d171560ad3c041790559624e 100644 (file)
@@ -6779,7 +6779,9 @@ ipp_set_value(ipp_t           *ipp,       /* IO - IPP message */
     * Reset pointers in the list...
     */
 
+#ifndef __clang_analyzer__
     DEBUG_printf(("4debug_free: %p %s", (void *)*attr, temp->name));
+#endif /* !__clang_analyzer__ */
     DEBUG_printf(("4debug_alloc: %p %s %s%s (%d)", (void *)temp, temp->name, temp->num_values > 1 ? "1setOf " : "", ippTagString(temp->value_tag), temp->num_values));
 
     if (ipp->current == *attr && ipp->prev)
index cd88b209813a1905ebef36250e94fadb3fa4b16e..1e1fa3eeffa880e7b499db0720b5e5b4d1b12e94 100644 (file)
@@ -1234,10 +1234,10 @@ asn1_get_integer(
     return (0);
   }
 
-  for (value = (**buffer & 0x80) ? -1 : 0;
+  for (value = (**buffer & 0x80) ? ~0 : 0;
        length > 0 && *buffer < bufend;
        length --, (*buffer) ++)
-    value = (value << 8) | **buffer;
+    value = ((value & 0xffffff) << 8) | **buffer;
 
   return (value);
 }
index 39ccb286b241f94d4df0d14e703cdcd75527e49a..9b5bc6395c2e8c7f0522cfc56cdf7c73cfa3d676 100644 (file)
@@ -4783,7 +4783,7 @@ with_value(_cups_testdata_t *data,        /* I - Test data */
             * Grab hex-encoded value...
             */
 
-            if ((withlen = (int)strlen(value)) & 1 || withlen > (2 * (sizeof(withdata) + 1)))
+            if ((withlen = (int)strlen(value)) & 1 || withlen > (int)(2 * (sizeof(withdata) + 1)))
             {
              print_fatal_error(data, "Bad WITH-VALUE hex value.");
               return (0);