1
0
mirror of https://git.familie-radermacher.ch/linux/ptouch-print.git synced 2025-11-21 04:42:04 +00:00

fix some compile warnings

This commit is contained in:
Dominic Radermacher
2022-09-11 06:45:00 +02:00
parent 71396e8ff1
commit f56d7ea740
4 changed files with 8 additions and 8 deletions

View File

@@ -79,8 +79,6 @@ struct _pt_dev_info ptdevs[] = {
{0,0,"",0,0,0}
};
void ptouch_rawstatus(uint8_t raw[32]);
int ptouch_open(ptouch_dev *ptdev)
{
libusb_device **devs;
@@ -191,7 +189,7 @@ int ptouch_init(ptouch_dev ptdev)
memset(cmd, 0, 100);
cmd[100] = 0x1b; /* ESC */
cmd[101] = 0x40; /* @ */
return ptouch_send(ptdev, (uint8_t *)cmd, strlen(cmd));
return ptouch_send(ptdev, (uint8_t *)cmd, sizeof(cmd));
}
int ptouch_enable_packbits(ptouch_dev ptdev)

View File

@@ -92,7 +92,7 @@ int print_img(ptouch_dev ptdev, gdImage *im)
//offset=64-(gdImageSY(im)/2); /* always print centered */
size_t max_pixels=ptouch_get_max_width(ptdev);
offset=((int)max_pixels / 2)-(gdImageSY(im)/2); /* always print centered */
printf("max_pixels=%d, offset=%d\n", max_pixels, offset);
printf("max_pixels=%ld, offset=%d\n", max_pixels, offset);
if ((ptdev->devinfo->flags & FLAG_RASTER_PACKBITS) == FLAG_RASTER_PACKBITS) {
if (debug) {
printf("enable PackBits mode\n");
@@ -528,7 +528,7 @@ int main(int argc, char *argv[])
printf("text color = %02x (%s)\n", ptdev->status->text_color, pt_textcolor(ptdev->status->text_color));
printf("error = %04x\n", ptdev->status->error);
if (debug) {
ptouch_rawstatus(ptdev->status);
ptouch_rawstatus((uint8_t *)ptdev->status);
}
exit(0);
} else if (strcmp(&argv[i][1], "-image") == 0) {