kopia lustrzana https://gitlab.com/sane-project/backends
Adjust conditional expressions to resolve compiler warnings
rodzic
2955089cd9
commit
6cc15e2b81
|
@ -178,8 +178,8 @@ int sanei_canon_pp_wake_scanner(struct parport *port, int mode)
|
||||||
usleep(100000);
|
usleep(100000);
|
||||||
}
|
}
|
||||||
|
|
||||||
} while ((i < max_cycles) && (!expect(port,"Scanner wakeup reply 2",
|
} while ((i < max_cycles) && expect(port, "Scanner wakeup reply 2",
|
||||||
0x03, 0x1f, 100000) == 0));
|
0x03, 0x1f, 100000));
|
||||||
|
|
||||||
/* Block just after chessboarding
|
/* Block just after chessboarding
|
||||||
Reply 1 (S3 and S4 on, S5 and S7 off) */
|
Reply 1 (S3 and S4 on, S5 and S7 off) */
|
||||||
|
|
|
@ -827,7 +827,7 @@ typedef struct Microtek2_Info {
|
||||||
SANE_Byte nlens;
|
SANE_Byte nlens;
|
||||||
SANE_Byte nwindows;
|
SANE_Byte nwindows;
|
||||||
SANE_Byte shtrnsferequ;
|
SANE_Byte shtrnsferequ;
|
||||||
#define MI_WHITE_SHADING_ONLY(x) ((x) & 0x20) == 0
|
#define MI_WHITE_SHADING_ONLY(x) (((x) & 0x20) == 0)
|
||||||
#define MI_HAS_SCNBTTN SANE_TRUE
|
#define MI_HAS_SCNBTTN SANE_TRUE
|
||||||
SANE_Bool scnbuttn;
|
SANE_Bool scnbuttn;
|
||||||
#define MI_HAS_PIPOBUF SANE_TRUE
|
#define MI_HAS_PIPOBUF SANE_TRUE
|
||||||
|
|
|
@ -3901,12 +3901,12 @@ Asic_SetWindow (PAsic chip, SANE_Byte bScanBits,
|
||||||
BytePerPixel = 2;
|
BytePerPixel = 2;
|
||||||
chip->dwBytesCountPerRow = (unsigned int) (wWidth) * 2;
|
chip->dwBytesCountPerRow = (unsigned int) (wWidth) * 2;
|
||||||
}
|
}
|
||||||
else if ((bScanBits == 8))
|
else if (bScanBits == 8)
|
||||||
{
|
{
|
||||||
BytePerPixel = 1;
|
BytePerPixel = 1;
|
||||||
chip->dwBytesCountPerRow = (unsigned int) (wWidth);
|
chip->dwBytesCountPerRow = (unsigned int) (wWidth);
|
||||||
}
|
}
|
||||||
else if ((bScanBits < 8))
|
else if (bScanBits < 8)
|
||||||
{
|
{
|
||||||
BytePerPixel = 1;
|
BytePerPixel = 1;
|
||||||
chip->dwBytesCountPerRow = (unsigned int) (wWidth);
|
chip->dwBytesCountPerRow = (unsigned int) (wWidth);
|
||||||
|
@ -4926,13 +4926,13 @@ Asic_SetCalibrate (PAsic chip, SANE_Byte bScanBits, unsigned short wXResolution,
|
||||||
BytePerPixel = 2;
|
BytePerPixel = 2;
|
||||||
chip->dwBytesCountPerRow = (unsigned int) (wWidth) * 2;
|
chip->dwBytesCountPerRow = (unsigned int) (wWidth) * 2;
|
||||||
}
|
}
|
||||||
else if ((bScanBits == 8))
|
else if (bScanBits == 8)
|
||||||
{
|
{
|
||||||
wPerLineNeedBufferSize = wWidth;
|
wPerLineNeedBufferSize = wWidth;
|
||||||
BytePerPixel = 1;
|
BytePerPixel = 1;
|
||||||
chip->dwBytesCountPerRow = (unsigned int) (wWidth);
|
chip->dwBytesCountPerRow = (unsigned int) (wWidth);
|
||||||
}
|
}
|
||||||
else if ((bScanBits < 8))
|
else if (bScanBits < 8)
|
||||||
{
|
{
|
||||||
wPerLineNeedBufferSize = wWidth >> 3;
|
wPerLineNeedBufferSize = wWidth >> 3;
|
||||||
BytePerPixel = 1;
|
BytePerPixel = 1;
|
||||||
|
|
|
@ -1439,7 +1439,7 @@ stv680_bayer_unshuffle (Stv680_Vidcam * dev, SANE_Byte * buf, size_t * size)
|
||||||
"stv680_bayer_unshuffle: if needed, trim to size 160 done\n");
|
"stv680_bayer_unshuffle: if needed, trim to size 160 done\n");
|
||||||
}
|
}
|
||||||
/* reset to proper width */
|
/* reset to proper width */
|
||||||
if ((dev->subsample == 160))
|
if (dev->subsample == 160)
|
||||||
{
|
{
|
||||||
vw = 160;
|
vw = 160;
|
||||||
vh = 120;
|
vh = 120;
|
||||||
|
|
Ładowanie…
Reference in New Issue