diff --git a/drivers/libusb1.c b/drivers/libusb1.c index be7ebf72a7..8b2459c09e 100644 --- a/drivers/libusb1.c +++ b/drivers/libusb1.c @@ -730,8 +730,8 @@ static int nut_libusb_open(libusb_device_handle **udevp, #if (defined HAVE_PRAGMA_GCC_DIAGNOSTIC_PUSH_POP) && ( (defined HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_TYPE_LIMITS) || (defined HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE) || (defined HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_TAUTOLOGICAL_UNSIGNED_ZERO_COMPARE) ) # pragma GCC diagnostic pop #endif - upsdebugx(2, "HID descriptor too long %d (max %d)", - rdlen, UINT16_MAX); + upsdebugx(2, "HID descriptor too long %d (max %" PRIuMAX ")", + rdlen, (uintmax_t)UINT16_MAX); goto next_device; } diff --git a/drivers/nut-libfreeipmi.c b/drivers/nut-libfreeipmi.c index 02f87b090c..8e37414772 100644 --- a/drivers/nut-libfreeipmi.c +++ b/drivers/nut-libfreeipmi.c @@ -230,7 +230,7 @@ int nut_ipmi_open(int ipmi_id, IPMIDevice_t *ipmi_dev) if (area_length > (int)UINT8_MAX) { libfreeipmi_cleanup(); fatal_with_errno(EXIT_FAILURE, - "nut_ipmi_open: got area_length %d is too large for libfreeipmi", + "nut_ipmi_open: got area_length %u is too large for libfreeipmi", area_length); } @@ -794,7 +794,7 @@ static int libfreeipmi_get_sensors_info (IPMIDevice_t *ipmi_dev) if (tmp_entity_id == entity_id && tmp_entity_instance == entity_instance) { - upsdebugx (1, "Found record id = %u for device id %u", + upsdebugx (1, "Found record id = %u for device id %i", record_id, ipmi_dev->ipmi_id); /* Add it to the tracked list */ @@ -817,7 +817,7 @@ static int libfreeipmi_get_sensors_info (IPMIDevice_t *ipmi_dev) #endif /* HAVE_FREEIPMI_11X_12X */ if (ipmi_dev->sensors_count > INT_MAX) { - upsdebugx(1, "%s: Found %i sensors which is too many", + upsdebugx(1, "%s: Found %u sensors which is too many", __func__, ipmi_dev->sensors_count); } return (int)ipmi_dev->sensors_count; diff --git a/tools/nut-scanner/scan_ipmi.c b/tools/nut-scanner/scan_ipmi.c index 0d40bfa63f..fb566480d9 100644 --- a/tools/nut-scanner/scan_ipmi.c +++ b/tools/nut-scanner/scan_ipmi.c @@ -617,13 +617,13 @@ nutscan_device_t * nutscan_scan_ipmi_device(const char * IPaddr, nutscan_ipmi_t nut_dev->type = TYPE_IPMI; nut_dev->driver = strdup(NUT_IPMI_DRV_NAME); if (IPaddr == NULL) { - sprintf(port_id, "id%x", ipmi_id); + sprintf(port_id, "id%x", (unsigned int)ipmi_id); } else { /* FIXME: also check against "localhost" and its IPv{4,6} */ /* FIXME: Should the IPv6 address here be bracketed? * Does our driver support the notation? */ - sprintf(port_id, "id%x@%s", ipmi_id, IPaddr); + sprintf(port_id, "id%x@%s", (unsigned int)ipmi_id, IPaddr); } nut_dev->port = strdup(port_id); /* FIXME: also dump device.serial? @@ -845,7 +845,7 @@ nutscan_device_t * nutscan_scan_ip_range_ipmi(nutscan_ip_range_list_t * irl, nut upsdebugx(4, "%s: max_threads_scantype=%" PRIuSIZE " curr_threads=%" PRIuSIZE " thread_count=%" PRIuSIZE - " stwST=%d stwS=%d pass=%d", + " stwST=%d stwS=%d pass=%u", __func__, max_threads_scantype, curr_threads, thread_count, stwST, stwS, pass