]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Use %u for unsigned, not signed 656/head
authorRose <83477269+AtariDreams@users.noreply.github.com>
Wed, 19 Apr 2023 18:12:13 +0000 (14:12 -0400)
committerRose <83477269+AtariDreams@users.noreply.github.com>
Wed, 10 May 2023 14:09:11 +0000 (10:09 -0400)
backend/dnssd.c
backend/ipp.c
backend/lpd.c
backend/usb-darwin.c
backend/usb-libusb.c
cups/auth.c

index f1f4bc1e154527f779cce1d1fba814ee3877579b..14a6772fb7b4ac103264c7f8ef0d4e6308121ef7 100644 (file)
@@ -553,7 +553,7 @@ browse_callback(
     void                *context)      /* I - Devices array */
 {
   fprintf(stderr, "DEBUG2: browse_callback(sdRef=%p, flags=%x, "
-                  "interfaceIndex=%d, errorCode=%d, serviceName=\"%s\", "
+                  "interfaceIndex=%u, errorCode=%d, serviceName=\"%s\", "
                  "regtype=\"%s\", replyDomain=\"%s\", context=%p)\n",
           sdRef, flags, interfaceIndex, errorCode,
          serviceName, regtype, replyDomain, context);
@@ -592,7 +592,7 @@ browse_local_callback(
 
 
   fprintf(stderr, "DEBUG2: browse_local_callback(sdRef=%p, flags=%x, "
-                  "interfaceIndex=%d, errorCode=%d, serviceName=\"%s\", "
+                  "interfaceIndex=%u, errorCode=%d, serviceName=\"%s\", "
                  "regtype=\"%s\", replyDomain=\"%s\", context=%p)\n",
           sdRef, flags, interfaceIndex, errorCode,
          serviceName, regtype, replyDomain, context);
@@ -1010,7 +1010,7 @@ query_callback(
 
 #  ifdef HAVE_MDNSRESPONDER
   fprintf(stderr, "DEBUG2: query_callback(sdRef=%p, flags=%x, "
-                  "interfaceIndex=%d, errorCode=%d, fullName=\"%s\", "
+                  "interfaceIndex=%u, errorCode=%d, fullName=\"%s\", "
                  "rrtype=%u, rrclass=%u, rdlen=%u, rdata=%p, ttl=%u, "
                  "context=%p)\n",
           sdRef, flags, interfaceIndex, errorCode, fullName, rrtype, rrclass, rdlen, rdata, ttl, context);
@@ -1023,7 +1023,7 @@ query_callback(
     return;
 
 #  else
-  fprintf(stderr, "DEBUG2: query_callback(browser=%p, interfaceIndex=%d, "
+  fprintf(stderr, "DEBUG2: query_callback(browser=%p, interfaceIndex=%u, "
                   "protocol=%d, event=%d, fullName=\"%s\", rrclass=%u, "
                  "rrtype=%u, rdata=%p, rdlen=%u, flags=%x, context=%p)\n",
           browser, interfaceIndex, protocol, event, fullName, rrclass, rrtype, rdata, (unsigned)rdlen, flags, context);
index 7c8dea5e09b2d6e5d169cde122e73a77fdfe314d..c8172792fe141d50e79400ef5e62de4180bd7b59 100644 (file)
@@ -3249,7 +3249,7 @@ run_as_user(char       *argv[],           /* I - Command-line arguments */
                                        /* Status of request */
 
 
-  fprintf(stderr, "DEBUG: Running IPP backend as UID %d.\n", (int)uid);
+  fprintf(stderr, "DEBUG: Running IPP backend as UID %u.\n", (unsigned)uid);
 
  /*
   * Connect to the user agent for the specified UID...
index 26e84171bdf48a3ffe9ee790be0d23bfc49660c4..a7a44ab20fa28465945511fc20d917ff922c4432 100644 (file)
@@ -1043,7 +1043,7 @@ lpd_queue(const char      *hostname,      /* I - Host to connect to */
       * Send the control file...
       */
 
-      if (lpd_command(fd, "\002%d cfA%03d%.15s\n", (int)strlen(control),
+      if (lpd_command(fd, "\002%u cfA%03d%.15s\n", (unsigned)strlen(control),
                       (int)getpid() % 1000, localhost))
       {
        close(fd);
@@ -1176,7 +1176,7 @@ lpd_queue(const char      *hostname,      /* I - Host to connect to */
       * Send control file...
       */
 
-      if (lpd_command(fd, "\002%d cfA%03d%.15s\n", (int)strlen(control),
+      if (lpd_command(fd, "\002%u cfA%03d%.15s\n", (unsigned)strlen(control),
                       (int)getpid() % 1000, localhost))
       {
        close(fd);
@@ -1184,8 +1184,8 @@ lpd_queue(const char      *hostname,      /* I - Host to connect to */
         return (CUPS_BACKEND_FAILED);
       }
 
-      fprintf(stderr, "DEBUG: Sending control file (%lu bytes)\n",
-             (unsigned long)strlen(control));
+      fprintf(stderr, "DEBUG: Sending control file (%u bytes)\n",
+             (unsigned)strlen(control));
 
       if ((size_t)lpd_write(fd, control, strlen(control) + 1) < (strlen(control) + 1))
       {
index a4cd25dcb7133dcff59982cb18d030231e9e1c05..ec3d89b14a8dc1755202d38127f0500b07dc0e64 100644 (file)
@@ -772,7 +772,7 @@ print_device(const char *uri,               /* I - Device URI */
        }
        else if (bytes > 0)
        {
-         fprintf(stderr, "DEBUG: Wrote %d bytes of print data...\n", (int)bytes);
+         fprintf(stderr, "DEBUG: Wrote %u bytes of print data...\n", (unsigned)bytes);
 
          g.print_bytes -= bytes;
          print_ptr   += bytes;
index f0373c0440d41ab04c4451696bcdf0ed0c537551..ced9ef7462b373f71fb53f81dcd438023ef0983e 100644 (file)
@@ -1427,7 +1427,7 @@ open_device(usb_printer_t *printer,       /* I - Printer */
   int  number1 = -1,                   /* Configuration/interface/altset */
         number2 = -1,                  /* numbers */
         errcode = 0;
-  char current;                        /* Current configuration */
+  unsigned char        current;                        /* Current configuration */
 
 
  /*
@@ -1504,7 +1504,7 @@ open_device(usb_printer_t *printer,       /* I - Printer */
                 LIBUSB_REQUEST_TYPE_STANDARD | LIBUSB_ENDPOINT_IN |
                LIBUSB_RECIPIENT_DEVICE,
                8, /* GET_CONFIGURATION */
-               0, 0, (unsigned char *)&current, 1, 5000) < 0)
+               0, 0, &current, 1, 5000) < 0)
     current = 0;                       /* Assume not configured */
 
   printer->origconf = current;
index dd6bd63f0acf55b3d4eea16e3e6bab8c8caa7104..dbcc0a8a8f1f6b3719417498d58f2ff86232a805 100644 (file)
@@ -733,7 +733,7 @@ cups_auth_scheme(const char *www_authenticate,      /* I - Pointer into WWW-Authentic
   int          param;                          /* Is this a parameter? */
 
 
-  DEBUG_printf(("8cups_auth_scheme(www_authenticate=\"%s\", scheme=%p, schemesize=%d)", www_authenticate, (void *)scheme, (int)schemesize));
+  DEBUG_printf(("8cups_auth_scheme(www_authenticate=\"%s\", scheme=%p, schemesize=%u)", www_authenticate, (void *)scheme, (unsigned)schemesize));
 
   while (*www_authenticate)
   {