kopia lustrzana https://gitlab.com/sane-project/backends
Remove unused functions which cause compiler warnings
rodzic
0d032cd982
commit
a82a312d85
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
Ładowanie…
Reference in New Issue