Remove implicit fall-throughs from bitmap.c and parallel.c

This commit is contained in:
Karl Mikaelsson 2017-11-17 12:46:17 +01:00
parent 81c030a887
commit 1cdf4e87cb
2 changed files with 12 additions and 0 deletions

View File

@ -135,6 +135,8 @@ bitmap_decompress1(uint8 * output, int width, int height, uint8 * input, int siz
break; break;
case 8: /* Bicolour */ case 8: /* Bicolour */
colour1 = CVAL(input); colour1 = CVAL(input);
colour2 = CVAL(input);
break;
case 3: /* Colour */ case 3: /* Colour */
colour2 = CVAL(input); colour2 = CVAL(input);
break; break;
@ -333,6 +335,8 @@ bitmap_decompress2(uint8 * output, int width, int height, uint8 * input, int siz
break; break;
case 8: /* Bicolour */ case 8: /* Bicolour */
CVAL2(input, colour1); CVAL2(input, colour1);
CVAL2(input, colour2);
break;
case 3: /* Colour */ case 3: /* Colour */
CVAL2(input, colour2); CVAL2(input, colour2);
break; break;
@ -535,6 +539,10 @@ bitmap_decompress3(uint8 * output, int width, int height, uint8 * input, int siz
colour1[0] = CVAL(input); colour1[0] = CVAL(input);
colour1[1] = CVAL(input); colour1[1] = CVAL(input);
colour1[2] = CVAL(input); colour1[2] = CVAL(input);
colour2[0] = CVAL(input);
colour2[1] = CVAL(input);
colour2[2] = CVAL(input);
break;
case 3: /* Colour */ case 3: /* Colour */
colour2[0] = CVAL(input); colour2[0] = CVAL(input);
colour2[1] = CVAL(input); colour2[1] = CVAL(input);

View File

@ -144,12 +144,16 @@ parallel_write(RD_NTHANDLE handle, uint8 * data, uint32 length, uint32 offset, u
{ {
case EAGAIN: case EAGAIN:
rc = RD_STATUS_DEVICE_OFF_LINE; rc = RD_STATUS_DEVICE_OFF_LINE;
break;
case ENOSPC: case ENOSPC:
rc = RD_STATUS_DEVICE_PAPER_EMPTY; rc = RD_STATUS_DEVICE_PAPER_EMPTY;
break;
case EIO: case EIO:
rc = RD_STATUS_DEVICE_OFF_LINE; rc = RD_STATUS_DEVICE_OFF_LINE;
break;
default: default:
rc = RD_STATUS_DEVICE_POWERED_OFF; rc = RD_STATUS_DEVICE_POWERED_OFF;
break;
} }
#if defined(LPGETSTATUS) #if defined(LPGETSTATUS)
if (ioctl(handle, LPGETSTATUS, &status) == 0) if (ioctl(handle, LPGETSTATUS, &status) == 0)