From 43135ab7ed7bee2ee647cc6fdf99611ffe493e6a Mon Sep 17 00:00:00 2001 From: Ralph Little Date: Mon, 6 Nov 2023 10:29:19 -0800 Subject: [PATCH] avision: fix for warning related to pthread unused variable and shadowed variable name. --- backend/avision.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/backend/avision.c b/backend/avision.c index 82102c226..a681ed250 100644 --- a/backend/avision.c +++ b/backend/avision.c @@ -7520,7 +7520,6 @@ reader_process (void *data) sigset_t sigterm_set; sigset_t ignore_set; struct SIGACTION act; - int old; FILE* fp; FILE* fp_fd = 0; /* for ADF bottom offset truncating */ @@ -7800,7 +7799,10 @@ reader_process (void *data) sigprocmask (SIG_BLOCK, &sigterm_set, 0); #ifdef USE_PTHREAD else - pthread_setcancelstate (PTHREAD_CANCEL_DISABLE, &old); + { + int old; + pthread_setcancelstate (PTHREAD_CANCEL_DISABLE, &old); + } #endif status = read_data (s, stripe_data + stripe_fill, &this_read); @@ -7809,10 +7811,12 @@ reader_process (void *data) sigprocmask (SIG_UNBLOCK, &sigterm_set, 0); #ifdef USE_PTHREAD else - pthread_setcancelstate (PTHREAD_CANCEL_ENABLE, &old); + { + int old; + pthread_setcancelstate (PTHREAD_CANCEL_ENABLE, &old); + } #endif - /* only EOF on the second stripe, as otherwise the rear page is shorter */ if (status == SANE_STATUS_EOF && deinterlace == STRIPE) {