From a82a312d8541b92b0c34403b8723c9caaec89ab7 Mon Sep 17 00:00:00 2001 From: David Ward Date: Tue, 8 Mar 2022 19:00:00 -0500 Subject: [PATCH] Remove unused functions which cause compiler warnings --- backend/epson2.c | 15 --------------- backend/kvs20xx_opt.c | 5 ----- backend/kvs40xx.c | 5 ----- backend/kvs40xx_opt.c | 5 ----- sanei/sanei_pio.c | 34 ---------------------------------- 5 files changed, 64 deletions(-) diff --git a/backend/epson2.c b/backend/epson2.c index 3efbfa3ee..cfc2aca00 100644 --- a/backend/epson2.c +++ b/backend/epson2.c @@ -2297,21 +2297,6 @@ sane_start(SANE_Handle handle) return status; } -static inline int -get_color(int status) -{ - switch ((status >> 2) & 0x03) { - case 1: - return 1; - case 2: - return 0; - case 3: - return 2; - default: - return 0; /* required to make the compiler happy */ - } -} - /* this moves data from our buffers to SANE */ SANE_Status diff --git a/backend/kvs20xx_opt.c b/backend/kvs20xx_opt.c index 3e8276452..229bf851f 100644 --- a/backend/kvs20xx_opt.c +++ b/backend/kvs20xx_opt.c @@ -673,11 +673,6 @@ mm2scanner_units (unsigned mm) { return mm * 12000 / 254; } -static inline unsigned -scanner_units2mm (unsigned u) -{ - return u * 254 / 12000; -} void kvs20xx_init_window (struct scanner *s, struct window *wnd, int wnd_id) diff --git a/backend/kvs40xx.c b/backend/kvs40xx.c index 230bdc293..ce1c055cf 100644 --- a/backend/kvs40xx.c +++ b/backend/kvs40xx.c @@ -118,11 +118,6 @@ static inline void buf_set_st(struct buf *b, SANE_Status st) pthread_mutex_unlock(&b->mu); } -static inline void buf_cancel(struct buf *b) -{ - buf_set_st(b, SANE_STATUS_CANCELLED); -} - static inline void push_buf(struct buf *b, SANE_Int sz) { pthread_mutex_lock(&b->mu); diff --git a/backend/kvs40xx_opt.c b/backend/kvs40xx_opt.c index 8c3771141..2d8d870c9 100644 --- a/backend/kvs40xx_opt.c +++ b/backend/kvs40xx_opt.c @@ -29,11 +29,6 @@ mm2scanner_units (unsigned mm) { return (mm * 12000 / 254.0 + .5); } -static inline unsigned -scanner_units2mm (unsigned u) -{ - return (u * 254.0 / 12000 + .5); -} struct restriction { unsigned ux, uy, ux_pix, uy_pix; diff --git a/sanei/sanei_pio.c b/sanei/sanei_pio.c index 4f2d89958..cd379ddb8 100644 --- a/sanei/sanei_pio.c +++ b/sanei/sanei_pio.c @@ -131,8 +131,6 @@ static PortRec port[] = extern int setuid (uid_t); -static inline int pio_outb (const Port port, u_char val, u_long addr); -static inline int pio_inb (const Port port, u_char * val, u_long addr); static inline int pio_wait (const Port port, u_char val, u_char mask); static inline void pio_ctrl (const Port port, u_char val); static inline void pio_delay (const Port port); @@ -142,38 +140,6 @@ static int pio_write (const Port port, const u_char * buf, int n); static int pio_read (const Port port, u_char * buf, int n); static int pio_open (const char *dev, SANE_Status * status); -static inline int -pio_outb (const Port port, u_char val, u_long addr) -{ - - if (-1 == port->fd) - sanei_outb (addr, val); - else - { - if (addr != (u_long)lseek (port->fd, addr, SEEK_SET)) - return -1; - if (1 != write (port->fd, &val, 1)) - return -1; - } - return 0; -} - -static inline int -pio_inb (const Port port, u_char * val, u_long addr) -{ - - if (-1 == port->fd) - *val = sanei_inb (addr); - else - { - if (addr != (u_long)lseek (port->fd, addr, SEEK_SET)) - return -1; - if (1 != read (port->fd, val, 1)) - return -1; - } - return 0; -} - static inline int pio_wait (const Port port, u_char val, u_char mask) {