misc: Fix several cppcheck format string warnings.

This commit is contained in:
Solomon Peachy 2019-05-14 23:06:39 -04:00
parent 3db30facc8
commit f6e65c51cd
4 changed files with 4 additions and 4 deletions

View File

@ -1996,7 +1996,7 @@ top:
/* Program in the multicut setting, if one exists */
if (multicut) {
snprintf(buf, sizeof(buf), "%08u", multicut);
snprintf(buf, sizeof(buf), "%08d", multicut);
dnpds40_build_cmd(&cmd, "IMAGE", "MULTICUT", 8);
if ((ret = dnpds40_do_cmd(ctx, &cmd, (uint8_t*)buf, 8)))
return CUPS_BACKEND_FAILED;

View File

@ -348,7 +348,7 @@ static void kodak68x0_dump_status(struct kodak6800_ctx *ctx, struct kodak68x0_st
}
if (max) {
INFO("\t Remaining : %d\n", max - be32_to_cpu(status->media));
INFO("\t Remaining : %u\n", max - be32_to_cpu(status->media));
} else {
INFO("\t Remaining : Unknown\n");
}

View File

@ -95,7 +95,7 @@ int sinfonia_read_parse(int data_fd, uint32_t model,
do {
ret = read(data_fd, ptr, remain);
if (ret < 0) {
ERROR("Read failed (%d/%d/%d)\n",
ERROR("Read failed (%d/%u/%d)\n",
ret, remain, job->datalen);
perror("ERROR: Read failed");
free(job->databuf);

View File

@ -405,7 +405,7 @@ static int upd_read_parse(void *vctx, const void **vjob, int data_fd, int copies
/* Sanity check job parameters */
if (job->imglen != (uint32_t)(job->rows * job->cols * ctx->native_bpp))
{
ERROR("Job data length mismatch (%u vs %u)!\n",
ERROR("Job data length mismatch (%u vs %d)!\n",
job->imglen, job->rows * job->cols * ctx->native_bpp);
return CUPS_BACKEND_CANCEL;
}