From f4e6677fc1f1fa3d4862ac5b45f3428d434dd2a3 Mon Sep 17 00:00:00 2001 From: Thierry HUCHARD Date: Sun, 22 Mar 2020 16:29:34 +0100 Subject: [PATCH] Fix build. --- backend/escl/escl.c | 3 +-- backend/escl/escl_crop.c | 2 ++ backend/escl/escl_jpeg.c | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/backend/escl/escl.c b/backend/escl/escl.c index 01e7d3917..2f067d129 100644 --- a/backend/escl/escl.c +++ b/backend/escl/escl.c @@ -404,7 +404,6 @@ sane_get_devices(const SANE_Device ***device_list, SANE_Bool local_only) static SANE_Status init_options(SANE_String_Const name, escl_sane_t *s) { - SANE_Range xrange, yrange; DBG (10, "escl init_options\n"); SANE_Status status = SANE_STATUS_GOOD; @@ -846,7 +845,7 @@ sane_start(SANE_Handle h) return SANE_STATUS_INVAL; } - DBG(10, "2-Size Image (%d)[%dx%d|%dx%d]\n", handler->scanner->img_size, 0, 0, w, he); + DBG(10, "2-Size Image (%ld)[%dx%d|%dx%d]\n", handler->scanner->img_size, 0, 0, w, he); if (status != SANE_STATUS_GOOD) return (status); diff --git a/backend/escl/escl_crop.c b/backend/escl/escl_crop.c index 3f0365d74..d49a804be 100644 --- a/backend/escl/escl_crop.c +++ b/backend/escl/escl_crop.c @@ -37,11 +37,13 @@ escl_crop_surface(capabilities_t *scanner, int *width, int *height) { + /* int x_off = 0, x = 0; int real_w = 0; int y_off = 0, y = 0; int real_h = 0; unsigned char *surface_crop = NULL; + */ /* DBG( 1, "Escl Image Crop\n"); if (w < (int)scanner->caps[scanner->source].width) diff --git a/backend/escl/escl_jpeg.c b/backend/escl/escl_jpeg.c index 647db1a60..c0042a2dd 100644 --- a/backend/escl/escl_jpeg.c +++ b/backend/escl/escl_jpeg.c @@ -208,14 +208,14 @@ get_JPEG_data(capabilities_t *scanner, int *width, int *height, int *bps) scanner->caps[scanner->source].width, scanner->caps[scanner->source].height); x_off = scanner->caps[scanner->source].pos_x; - if (x_off > scanner->caps[scanner->source].width) { + if (x_off > (unsigned int)scanner->caps[scanner->source].width) { w = scanner->caps[scanner->source].width; x_off = 0; } else w = scanner->caps[scanner->source].width - x_off; y_off = scanner->caps[scanner->source].pos_y; - if(y_off > scanner->caps[scanner->source].height) { + if(y_off > (unsigned int)scanner->caps[scanner->source].height) { h = scanner->caps[scanner->source].height; y_off = 0; }