summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenrik Andersson <hean01@cendio.com>2018-02-01 16:31:29 +0100
committerGitHub <noreply@github.com>2018-02-01 16:31:29 +0100
commitfe8438d5c316b721c2f073d4429a6b759b95b1d1 (patch)
tree5bfc26c04e61a02e878cd213c14a0fc0a2ea4b2e
parent50edf775e6a01268d54e06feb408640ad2f94a1b (diff)
parent1cdf4e87cb6a1cd415b36c3531acc7b51a4069c8 (diff)
downloadrdesktop-fe8438d5c316b721c2f073d4429a6b759b95b1d1.zip
Merge pull request #245 from derfian/implicit-fallthrough
Remove implicit fall-throughs from bitmap.c and parallel.c
-rw-r--r--bitmap.c8
-rw-r--r--parallel.c4
2 files changed, 12 insertions, 0 deletions
diff --git a/bitmap.c b/bitmap.c
index c0bd9a3..775622c 100644
--- a/bitmap.c
+++ b/bitmap.c
@@ -135,6 +135,8 @@ bitmap_decompress1(uint8 * output, int width, int height, uint8 * input, int siz
break;
case 8: /* Bicolour */
colour1 = CVAL(input);
+ colour2 = CVAL(input);
+ break;
case 3: /* Colour */
colour2 = CVAL(input);
break;
@@ -333,6 +335,8 @@ bitmap_decompress2(uint8 * output, int width, int height, uint8 * input, int siz
break;
case 8: /* Bicolour */
CVAL2(input, colour1);
+ CVAL2(input, colour2);
+ break;
case 3: /* Colour */
CVAL2(input, colour2);
break;
@@ -535,6 +539,10 @@ bitmap_decompress3(uint8 * output, int width, int height, uint8 * input, int siz
colour1[0] = CVAL(input);
colour1[1] = CVAL(input);
colour1[2] = CVAL(input);
+ colour2[0] = CVAL(input);
+ colour2[1] = CVAL(input);
+ colour2[2] = CVAL(input);
+ break;
case 3: /* Colour */
colour2[0] = CVAL(input);
colour2[1] = CVAL(input);
diff --git a/parallel.c b/parallel.c
index f086dbb..0f7874d 100644
--- a/parallel.c
+++ b/parallel.c
@@ -144,12 +144,16 @@ parallel_write(RD_NTHANDLE handle, uint8 * data, uint32 length, uint32 offset, u
{
case EAGAIN:
rc = RD_STATUS_DEVICE_OFF_LINE;
+ break;
case ENOSPC:
rc = RD_STATUS_DEVICE_PAPER_EMPTY;
+ break;
case EIO:
rc = RD_STATUS_DEVICE_OFF_LINE;
+ break;
default:
rc = RD_STATUS_DEVICE_POWERED_OFF;
+ break;
}
#if defined(LPGETSTATUS)
if (ioctl(handle, LPGETSTATUS, &status) == 0)