all: Fix up a a large pile of cppcheck warnings.

This commit is contained in:
Solomon Peachy 2016-08-21 10:23:00 -04:00
parent 0e5d7f9307
commit ea8e0b1f35
9 changed files with 75 additions and 73 deletions

View file

@ -392,7 +392,7 @@ static int kodak1400_read_parse(void *vctx, int data_fd) {
do {
ret = read(data_fd, ptr, remain);
if (ret < 0) {
ERROR("Read failed (%d/%d/%d) (%d/%d @ %d)\n",
ERROR("Read failed (%d/%d/%u) (%d/%u @ %d)\n",
ret, remain, ctx->hdr.columns,
i, ctx->hdr.rows, j);
perror("ERROR: Read failed");

View file

@ -405,7 +405,7 @@ static int kodak605_main_loop(void *vctx, int copies) {
if (ctx->last_donor != sts.donor) {
ctx->last_donor = sts.donor;
ATTR("marker-levels=%d\n", sts.donor);
ATTR("marker-levels=%u\n", sts.donor);
}
// XXX check for errors
@ -433,7 +433,7 @@ static int kodak605_main_loop(void *vctx, int copies) {
ctx->hdr.jobid = ctx->jobid;
{
INFO("Sending image header (internal id %d)\n", ctx->jobid);
INFO("Sending image header (internal id %u)\n", ctx->jobid);
if ((ret = send_data(ctx->dev, ctx->endp_down,
(uint8_t*)&ctx->hdr, sizeof(ctx->hdr))))
return CUPS_BACKEND_FAILED;
@ -461,14 +461,14 @@ static int kodak605_main_loop(void *vctx, int copies) {
INFO("Waiting for printer to acknowledge completion\n");
do {
sleep(1);
if ((ret = kodak605_get_status(ctx, &sts)))
if ((kodak605_get_status(ctx, &sts)) != 0)
return CUPS_BACKEND_FAILED;
// XXX check for errors
if (ctx->last_donor != sts.donor) {
ctx->last_donor = sts.donor;
ATTR("marker-levels=%d\n", sts.donor);
ATTR("marker-levels=%u\n", sts.donor);
} // XXX check for errors ?
/* Wait for completion */
@ -497,10 +497,10 @@ static void kodak605_dump_status(struct kodak605_ctx *ctx, struct kodak605_statu
bank_statuses(sts->b2_sts), sts->b2_id,
le16_to_cpu(sts->b2_complete), le16_to_cpu(sts->b2_total));
INFO("Lifetime prints : %d\n", be32_to_cpu(sts->ctr_life));
INFO("Cutter actuations : %d\n", be32_to_cpu(sts->ctr_cut));
INFO("Head prints : %d\n", be32_to_cpu(sts->ctr_head));
INFO("Media prints : %d\n", be32_to_cpu(sts->ctr_media));
INFO("Lifetime prints : %u\n", be32_to_cpu(sts->ctr_life));
INFO("Cutter actuations : %u\n", be32_to_cpu(sts->ctr_cut));
INFO("Head prints : %u\n", be32_to_cpu(sts->ctr_head));
INFO("Media prints : %u\n", be32_to_cpu(sts->ctr_media));
{
int max;
@ -515,13 +515,13 @@ static void kodak605_dump_status(struct kodak605_ctx *ctx, struct kodak605_statu
}
if (max) {
INFO("\t Remaining : %d\n", max - be32_to_cpu(sts->ctr_media));
INFO("\t Remaining : %u\n", max - be32_to_cpu(sts->ctr_media));
} else {
INFO("\t Remaining : Unknown\n");
}
}
INFO("Donor : %d%%\n", sts->donor);
INFO("Donor : %u%%\n", sts->donor);
}
static void kodak605_dump_mediainfo(struct kodak605_media_list *media)
@ -547,7 +547,7 @@ static void kodak605_dump_mediainfo(struct kodak605_media_list *media)
DEBUG("Legal print sizes:\n");
for (i = 0 ; i < media->count ; i++) {
DEBUG("\t%d: %dx%d\n", i,
DEBUG("\t%d: %ux%u\n", i,
le16_to_cpu(media->entries[i].cols),
le16_to_cpu(media->entries[i].rows));
}

View file

@ -569,10 +569,10 @@ static void kodak68x0_dump_status(struct kodak6800_ctx *ctx, struct kodak68x0_st
kodak68x0_status_str(status),
status->status1, be32_to_cpu(status->status2), status->errcode);
INFO("Bank 1 ID: %d\n", status->b1_jobid);
INFO("Bank 1 ID: %u\n", status->b1_jobid);
INFO("\tPrints: %d/%d complete\n",
be16_to_cpu(status->b1_complete), be16_to_cpu(status->b1_total));
INFO("Bank 2 ID: %d\n", status->b2_jobid);
INFO("Bank 2 ID: %u\n", status->b2_jobid);
INFO("\tPrints: %d/%d complete\n",
be16_to_cpu(status->b2_complete), be16_to_cpu(status->b2_total));
@ -593,14 +593,14 @@ static void kodak68x0_dump_status(struct kodak6800_ctx *ctx, struct kodak68x0_st
INFO("Tone Curve Status: %s\n", detail);
INFO("Counters:\n");
INFO("\tLifetime : %d\n", be32_to_cpu(status->lifetime));
INFO("\tThermal Head : %d\n", be32_to_cpu(status->maint));
INFO("\tCutter : %d\n", be32_to_cpu(status->cutter));
INFO("\tLifetime : %u\n", be32_to_cpu(status->lifetime));
INFO("\tThermal Head : %u\n", be32_to_cpu(status->maint));
INFO("\tCutter : %u\n", be32_to_cpu(status->cutter));
if (ctx->type == P_KODAK_6850) {
int max;
INFO("\tMedia : %d\n", be32_to_cpu(status->media));
INFO("\tMedia : %u\n", be32_to_cpu(status->media));
switch(ctx->media->type) {
case KODAK68x0_MEDIA_6R:
@ -620,7 +620,7 @@ static void kodak68x0_dump_status(struct kodak6800_ctx *ctx, struct kodak68x0_st
}
INFO("Main FW version : %d\n", be16_to_cpu(status->main_fw));
INFO("DSP FW version : %d\n", be16_to_cpu(status->dsp_fw));
INFO("Donor : %d%%\n", status->donor);
INFO("Donor : %u%%\n", status->donor);
INFO("\n");
}
@ -1151,7 +1151,7 @@ static int kodak6800_main_loop(void *vctx, int copies) {
if (ctx->last_donor != status.donor) {
ctx->last_donor = status.donor;
ATTR("marker-levels=%d\n", status.donor);
ATTR("marker-levels=%u\n", status.donor);
}
if (status.status1 == STATE_STATUS1_ERROR) {
@ -1201,7 +1201,7 @@ static int kodak6800_main_loop(void *vctx, int copies) {
}
#endif
INFO("Sending Print Job (internal id %d)\n", ctx->jobid);
INFO("Sending Print Job (internal id %u)\n", ctx->jobid);
if ((ret = kodak6800_do_cmd(ctx, (uint8_t*) &ctx->hdr, sizeof(ctx->hdr),
&status, sizeof(status),
&num)))
@ -1214,8 +1214,8 @@ static int kodak6800_main_loop(void *vctx, int copies) {
// sleep(1); // Appears to be necessary for reliability
INFO("Sending image data\n");
if ((ret = send_data(ctx->dev, ctx->endp_down,
ctx->databuf, ctx->datalen)))
if ((send_data(ctx->dev, ctx->endp_down,
ctx->databuf, ctx->datalen)) != 0)
return CUPS_BACKEND_FAILED;
INFO("Waiting for printer to acknowledge completion\n");
@ -1226,7 +1226,7 @@ static int kodak6800_main_loop(void *vctx, int copies) {
if (ctx->last_donor != status.donor) {
ctx->last_donor = status.donor;
ATTR("marker-levels=%d\n", status.donor);
ATTR("marker-levels=%u\n", status.donor);
}
if (status.status1 == STATE_STATUS1_ERROR) {

View file

@ -950,13 +950,15 @@ static int mitsu70x_main_loop(void *vctx, int copies) {
struct mitsu70x_jobstatus jobstatus;
struct mitsu70x_printerstatus_resp resp;
struct mitsu70x_jobs jobs;
struct mitsu70x_hdr *hdr = (struct mitsu70x_hdr*) (ctx->databuf + sizeof(struct mitsu70x_hdr));
struct mitsu70x_hdr *hdr;
int ret;
if (!ctx)
return CUPS_BACKEND_FAILED;
hdr = (struct mitsu70x_hdr*) (ctx->databuf + sizeof(struct mitsu70x_hdr));
INFO("Waiting for printer idle...\n");
top:
@ -1098,7 +1100,7 @@ skip_status:
#endif
/* We're clear to send data over! */
INFO("Sending Print Job (internal id %d)\n", ctx->jobid);
INFO("Sending Print Job (internal id %u)\n", ctx->jobid);
if ((ret = send_data(ctx->dev, ctx->endp_down,
ctx->databuf,
@ -1229,7 +1231,7 @@ static void mitsu70x_dump_printerstatus(struct mitsu70x_printerstatus_resp *resp
continue;
memcpy(buf, resp->vers[i].ver, 6);
buf[6] = 0;
INFO("Component #%d ID: %s (checksum %04x)\n",
INFO("Component #%u ID: %s (checksum %04x)\n",
i, buf, be16_to_cpu(resp->vers[i].checksum));
}
@ -1281,9 +1283,9 @@ static int mitsu70x_query_status(struct mitsu70x_ctx *ctx)
ret = mitsu70x_get_jobs(ctx, &jobs);
if (!ret) {
INFO("JOB0 ID : %06d\n", jobs.jobid_0);
INFO("JOB0 ID : %06u\n", jobs.jobid_0);
INFO("JOB0 status : %s\n", mitsu70x_jobstatuses(jobs.job0_status));
INFO("JOB1 ID : %06d\n", jobs.jobid_1);
INFO("JOB1 ID : %06u\n", jobs.jobid_1);
INFO("JOB1 status : %s\n", mitsu70x_jobstatuses(jobs.job1_status));
// XXX are there more?
}

View file

@ -175,15 +175,15 @@ struct mitsu9550_status2 {
donor = be16_to_cpu(media->remain)/be16_to_cpu(media->max); \
if (donor != ctx->last_donor) { \
ctx->last_donor = donor; \
ATTR("marker-levels=%d\n", donor); \
ATTR("marker-levels=%u\n", donor); \
} \
remain = be16_to_cpu(media->remain); \
if (remain != ctx->last_remain) { \
ctx->last_remain = remain; \
ATTR("marker-message=\"%d prints remaining on ribbon\"\n", remain); \
ATTR("marker-message=\"%u prints remaining on ribbon\"\n", remain); \
} \
if (validate_media(media->type, ctx->cols, ctx->rows)) { \
ERROR("Incorrect media (%d) type for printjob (%dx%d)!\n", media->type, ctx->cols, ctx->rows); \
ERROR("Incorrect media (%u) type for printjob (%ux%u)!\n", media->type, ctx->cols, ctx->rows); \
return CUPS_BACKEND_HOLD; \
} \
/* status2 */ \
@ -726,7 +726,7 @@ static int mitsu9550_query_serno(struct libusb_device_handle *dev, uint8_t endp_
/* If response is truncated, handle it */
num -= (sizeof(cmd) + 1);
if ((unsigned int) num != rdbuf[4])
WARNING("Short serno read! (%d vs %d)\r\n",
WARNING("Short serno read! (%d vs %u)\r\n",
num, rdbuf[4]);
/* model and serial number are encoded as 16-bit unicode,

View file

@ -890,26 +890,26 @@ static void shinkos1245_dump_status(struct shinkos1245_resp_status *sts)
shinkos1245_status_str(sts),
sts->state.status1, sts->state.status2, sts->state.error);
INFO("Counters:\n");
INFO("\tLifetime : %d\n", be32_to_cpu(sts->counters.lifetime));
INFO("\tThermal Head : %d\n", be32_to_cpu(sts->counters.maint));
INFO("\tMedia : %d\n", be32_to_cpu(sts->counters.media));
INFO("\tCutter : %d\n", be32_to_cpu(sts->counters.cutter));
INFO("\tLifetime : %u\n", be32_to_cpu(sts->counters.lifetime));
INFO("\tThermal Head : %u\n", be32_to_cpu(sts->counters.maint));
INFO("\tMedia : %u\n", be32_to_cpu(sts->counters.media));
INFO("\tCutter : %u\n", be32_to_cpu(sts->counters.cutter));
INFO("Versions:\n");
INFO("\tUSB Boot : %d\n", sts->counters.ver_boot);
INFO("\tUSB Control : %d\n", sts->counters.ver_ctrl);
INFO("\tMain Boot : %d\n", be16_to_cpu(sts->versions.main_boot));
INFO("\tMain Control: %d\n", be16_to_cpu(sts->versions.main_control));
INFO("\tDSP Boot : %d\n", be16_to_cpu(sts->versions.dsp_boot));
INFO("\tDSP Control : %d\n", be16_to_cpu(sts->versions.dsp_control));
INFO("\tUSB Boot : %u\n", sts->counters.ver_boot);
INFO("\tUSB Control : %u\n", sts->counters.ver_ctrl);
INFO("\tMain Boot : %u\n", be16_to_cpu(sts->versions.main_boot));
INFO("\tMain Control: %u\n", be16_to_cpu(sts->versions.main_control));
INFO("\tDSP Boot : %u\n", be16_to_cpu(sts->versions.dsp_boot));
INFO("\tDSP Control : %u\n", be16_to_cpu(sts->versions.dsp_control));
// INFO("USB TypeFlag: %02x\n", sts->counters.control_flag);
INFO("Bank 1 ID: %d\n", sts->counters2.bank1_id);
INFO("Bank 1 ID: %u\n", sts->counters2.bank1_id);
INFO("\tPrints: %d/%d complete\n",
be16_to_cpu(sts->counters2.bank1_complete),
be16_to_cpu(sts->counters2.bank1_spec));
INFO("Bank 2 ID: %d\n", sts->counters2.bank2_id);
INFO("Bank 2 ID: %u\n", sts->counters2.bank2_id);
INFO("\tPrints: %d/%d complete\n",
be16_to_cpu(sts->counters2.bank2_complete),
be16_to_cpu(sts->counters2.bank2_spec));
@ -939,7 +939,7 @@ static void shinkos1245_dump_media(struct shinkos1245_mediadesc *medias,
INFO("Supported print sizes: %d\n", count);
for (i = 0 ; i < count ; i++) {
INFO("\t %02x: %04d*%04d (%02x/%02d)\n",
INFO("\t %02x: %04u*%04u (%02x/%02u)\n",
medias[i].print_type,
medias[i].columns,
medias[i].rows,
@ -1326,7 +1326,7 @@ static int shinkos1245_read_parse(void *vctx, int data_fd) {
ctx->hdr.model = le32_to_cpu(ctx->hdr.model);
if(ctx->hdr.model != 1245) {
ERROR("Unrecognized printer (%d)!\n", ctx->hdr.model);
ERROR("Unrecognized printer (%u)!\n", ctx->hdr.model);
return CUPS_BACKEND_CANCEL;
}
@ -1503,7 +1503,7 @@ top:
}
}
INFO("Sending print job (internal id %d)\n", ctx->jobid);
INFO("Sending print job (internal id %u)\n", ctx->jobid);
shinkos1245_fill_hdr(&cmd.hdr);
cmd.cmd[0] = 0x0a;

View file

@ -889,7 +889,7 @@ static int get_status(struct shinkos2145_ctx *ctx)
le16_to_cpu(resp->bank1_specified),
le16_to_cpu(resp->bank1_remaining));
INFO("Bank 2: 0x%02x (%s) Job %03d @ %03d/%03d (%03d remaining)\n",
INFO("Bank 2: 0x%02x (%s) Job %03u @ %03u/%03u (%03u remaining)\n",
resp->bank2_status, bank_statuses(resp->bank1_status),
resp->bank2_printid,
le16_to_cpu(resp->bank2_finished),
@ -962,7 +962,7 @@ static int get_errorlog(struct shinkos2145_ctx *ctx)
if (le16_to_cpu(resp->hdr.payload_len) != (sizeof(struct s2145_errorlog_resp) - sizeof(struct s2145_status_hdr)))
return -2;
INFO("Stored Error Events: %d entries:\n", resp->count);
INFO("Stored Error Events: %u entries:\n", resp->count);
for (i = 0 ; i < resp->count ; i++) {
INFO(" %02d: @ %08u prints : 0x%02x/0x%02x (%s)\n", i,
le32_to_cpu(resp->items[i].print_counter),
@ -993,9 +993,9 @@ static int get_mediainfo(struct shinkos2145_ctx *ctx)
if (le16_to_cpu(resp->hdr.payload_len) != (sizeof(struct s2145_mediainfo_resp) - sizeof(struct s2145_status_hdr)))
return -2;
INFO("Supported Media Information: %d entries:\n", resp->count);
INFO("Supported Media Information: %u entries:\n", resp->count);
for (i = 0 ; i < resp->count ; i++) {
INFO(" %02d: C 0x%02x (%s), %04dx%04d, M 0x%02x (%s), P 0x%02x (%s)\n", i,
INFO(" %02d: C 0x%02x (%s), %04ux%04u, M 0x%02x (%s), P 0x%02x (%s)\n", i,
resp->items[i].code, print_sizes(resp->items[i].code),
le16_to_cpu(resp->items[i].columns),
le16_to_cpu(resp->items[i].rows),
@ -1459,7 +1459,7 @@ static int shinkos2145_read_parse(void *vctx, int data_fd) {
}
if (le32_to_cpu(ctx->hdr.model) != 2145) {
ERROR("Unrecognized printer (%d)!\n", le32_to_cpu(ctx->hdr.model));
ERROR("Unrecognized printer (%u)!\n", le32_to_cpu(ctx->hdr.model));
return CUPS_BACKEND_CANCEL;
}
@ -1640,7 +1640,7 @@ top:
break;
case S_PRINTER_READY_CMD:
INFO("Sending print job (internal id %d)\n", ctx->jobid);
INFO("Sending print job (internal id %u)\n", ctx->jobid);
memset(cmdbuf, 0, CMDBUF_LEN);
print->hdr.cmd = cpu_to_le16(S2145_CMD_PRINTJOB);

View file

@ -1183,7 +1183,7 @@ static int get_status(struct shinkos6145_ctx *ctx)
le16_to_cpu(resp->bank1_specified),
le16_to_cpu(resp->bank1_remaining));
INFO("Bank 2: 0x%02x (%s) Job %03d @ %03d/%03d (%03d remaining)\n",
INFO("Bank 2: 0x%02x (%s) Job %03u @ %03u/%03u (%03u remaining)\n",
resp->bank2_status, bank_statuses(resp->bank1_status),
resp->bank2_printid,
le16_to_cpu(resp->bank2_finished),
@ -1206,9 +1206,9 @@ static int get_status(struct shinkos6145_ctx *ctx)
if (le16_to_cpu(resp2->hdr.payload_len) != (sizeof(struct s6145_getextcounter_resp) - sizeof(struct s6145_status_hdr)))
return -1;
INFO("Lifetime Distance: %08d inches\n", le32_to_cpu(resp2->lifetime_distance));
INFO("Maintainence Distance: %08d inches\n", le32_to_cpu(resp2->maint_distance));
INFO("Head Distance: %08d inches\n", le32_to_cpu(resp2->head_distance));
INFO("Lifetime Distance: %08u inches\n", le32_to_cpu(resp2->lifetime_distance));
INFO("Maintainence Distance: %08u inches\n", le32_to_cpu(resp2->maint_distance));
INFO("Head Distance: %08u inches\n", le32_to_cpu(resp2->head_distance));
/* Query various params */
if(ctx->type == P_SHINKO_S6145D) {
@ -1322,7 +1322,7 @@ static int get_errorlog(struct shinkos6145_ctx *ctx)
if (le16_to_cpu(resp->hdr.payload_len) != (sizeof(struct s6145_errorlog_resp) - sizeof(struct s6145_status_hdr)))
return -2;
INFO("Stored Error Events: %d entries:\n", resp->count);
INFO("Stored Error Events: %u entries:\n", resp->count);
for (i = 0 ; i < resp->count ; i++) {
INFO(" %02d: @ %08u prints : 0x%02x/0x%02x (%s)\n", i,
le32_to_cpu(resp->items[i].print_counter),
@ -1354,9 +1354,9 @@ static int get_mediainfo(struct shinkos6145_ctx *ctx)
return -2;
INFO("Loaded Media Type: %s\n", print_ribbons(resp->ribbon));
INFO("Supported Print Sizes: %d entries:\n", resp->count);
INFO("Supported Print Sizes: %u entries:\n", resp->count);
for (i = 0 ; i < resp->count ; i++) {
INFO(" %02d: C 0x%02x (%s), %04dx%04d, P 0x%02x (%s)\n", i,
INFO(" %02d: C 0x%02x (%s), %04ux%04u, P 0x%02x (%s)\n", i,
resp->items[i].media_code, print_sizes(resp->items[i].media_code),
le16_to_cpu(resp->items[i].columns),
le16_to_cpu(resp->items[i].rows),
@ -2070,7 +2070,7 @@ static int shinkos6145_read_parse(void *vctx, int data_fd) {
}
if (le32_to_cpu(ctx->hdr.model) != 6145) {
ERROR("Unrecognized printer (%d)!\n", le32_to_cpu(ctx->hdr.model));
ERROR("Unrecognized printer (%u)!\n", le32_to_cpu(ctx->hdr.model));
return CUPS_BACKEND_CANCEL;
}
@ -2337,7 +2337,7 @@ top:
ctx->databuf = (uint8_t*) databuf2;
ctx->datalen = newlen;
INFO("Sending print job (internal id %d)\n", ctx->jobid);
INFO("Sending print job (internal id %u)\n", ctx->jobid);
memset(cmdbuf, 0, CMDBUF_LEN);
print->hdr.cmd = cpu_to_le16(S6145_CMD_PRINTJOB);

View file

@ -1014,7 +1014,7 @@ static int get_status(struct shinkos6245_ctx *ctx)
le16_to_cpu(resp->bank1_specified),
le16_to_cpu(resp->bank1_remaining));
INFO("Bank 2: 0x%02x (%s) Job %03d @ %03d/%03d (%03d remaining)\n",
INFO("Bank 2: 0x%02x (%s) Job %03u @ %03u/%03u (%03u remaining)\n",
resp->bank2_status, bank_statuses(resp->bank1_status),
resp->bank2_printid,
le16_to_cpu(resp->bank2_finished),
@ -1037,9 +1037,9 @@ static int get_status(struct shinkos6245_ctx *ctx)
if (le16_to_cpu(resp2->hdr.payload_len) != (sizeof(struct s6245_getextcounter_resp) - sizeof(struct s6245_status_hdr)))
return 0;
INFO("Lifetime Distance: %08d inches\n", le32_to_cpu(resp2->lifetime_distance));
INFO("Maintainence Distance: %08d inches\n", le32_to_cpu(resp2->maint_distance));
INFO("Head Distance: %08d inches\n", le32_to_cpu(resp2->head_distance));
INFO("Lifetime Distance: %08u inches\n", le32_to_cpu(resp2->lifetime_distance));
INFO("Maintainence Distance: %08u inches\n", le32_to_cpu(resp2->maint_distance));
INFO("Head Distance: %08u inches\n", le32_to_cpu(resp2->head_distance));
return 0;
}
@ -1110,13 +1110,13 @@ static int get_errorlog(struct shinkos6245_ctx *ctx)
return -2;
INFO("Stored Error ID %d:\n", i);
INFO(" %04d-%02d-%02d %02d:%02d:%02d @ %08u prints : 0x%02x/0x%02x (%s)\n",
INFO(" %04d-%02u-%02u %02u:%02u:%02u @ %08u prints : 0x%02x/0x%02x (%s)\n",
resp->time_year + 2000, resp->time_month, resp->time_day,
resp->time_hour, resp->time_min, resp->time_sec,
le32_to_cpu(resp->print_counter),
resp->error_major, resp->error_minor,
error_codes(resp->error_major, resp->error_minor));
INFO(" Temp: %02d/%02d Hum: %02d\n",
INFO(" Temp: %02u/%02u Hum: %02u\n",
resp->printer_thermistor, resp->head_thermistor, resp->printer_humidity);
} while (++i < le16_to_cpu(resp->error_count));
@ -1145,9 +1145,9 @@ static int get_mediainfo(struct shinkos6245_ctx *ctx)
return -2;
INFO("Loaded Media Type: %s\n", ribbon_sizes(resp->ribbon_code));
INFO("Supported Media Information: %d entries:\n", resp->count);
INFO("Supported Media Information: %u entries:\n", resp->count);
for (i = 0 ; i < resp->count ; i++) {
INFO(" %02d: C 0x%02x (%s), %04dx%04d, P 0x%02x (%s)\n", i,
INFO(" %02d: C 0x%02x (%s), %04ux%04u, P 0x%02x (%s)\n", i,
resp->items[i].media_code, print_sizes(resp->items[i].media_code),
le16_to_cpu(resp->items[i].columns),
le16_to_cpu(resp->items[i].rows),
@ -1556,7 +1556,7 @@ static int shinkos6245_read_parse(void *vctx, int data_fd) {
}
if (le32_to_cpu(ctx->hdr.model) != 6245) {
ERROR("Unrecognized printer (%d)!\n", le32_to_cpu(ctx->hdr.model));
ERROR("Unrecognized printer (%u)!\n", le32_to_cpu(ctx->hdr.model));
return CUPS_BACKEND_CANCEL;
}
@ -1784,7 +1784,7 @@ top:
case S_PRINTER_READY_CMD:
// XXX send "get eeprom backup command"
INFO("Sending print job (internal id %d)\n", ctx->jobid);
INFO("Sending print job (internal id %u)\n", ctx->jobid);
memset(cmdbuf, 0, CMDBUF_LEN);
print->hdr.cmd = cpu_to_le16(S6245_CMD_PRINTJOB);