From: Rose <83477269+AtariDreams@users.noreply.github.com> Date: Wed, 19 Apr 2023 18:12:13 +0000 (-0400) Subject: Use %u for unsigned, not signed X-Git-Tag: v2.4.3~26^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F656%2Fhead;p=thirdparty%2Fcups.git Use %u for unsigned, not signed --- diff --git a/backend/dnssd.c b/backend/dnssd.c index f1f4bc1e15..14a6772fb7 100644 --- a/backend/dnssd.c +++ b/backend/dnssd.c @@ -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); diff --git a/backend/ipp.c b/backend/ipp.c index 7c8dea5e09..c8172792fe 100644 --- a/backend/ipp.c +++ b/backend/ipp.c @@ -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... diff --git a/backend/lpd.c b/backend/lpd.c index 26e84171bd..a7a44ab20f 100644 --- a/backend/lpd.c +++ b/backend/lpd.c @@ -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)) { diff --git a/backend/usb-darwin.c b/backend/usb-darwin.c index a4cd25dcb7..ec3d89b14a 100644 --- a/backend/usb-darwin.c +++ b/backend/usb-darwin.c @@ -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; diff --git a/backend/usb-libusb.c b/backend/usb-libusb.c index f0373c0440..ced9ef7462 100644 --- a/backend/usb-libusb.c +++ b/backend/usb-libusb.c @@ -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 *)¤t, 1, 5000) < 0) + 0, 0, ¤t, 1, 5000) < 0) current = 0; /* Assume not configured */ printer->origconf = current; diff --git a/cups/auth.c b/cups/auth.c index dd6bd63f0a..dbcc0a8a8f 100644 --- a/cups/auth.c +++ b/cups/auth.c @@ -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) {