From f01ba80990c96b8761079c363b87aea676e5acd9 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Tue, 10 May 2016 17:01:22 +0200 Subject: Add SAL_FALLTHROUGH, where apparently appropriate Change-Id: Ib67f7cb71255a32810f09a6b7e528f024bbef9df --- sal/rtl/cipher.cxx | 14 ++++++++++++++ sal/rtl/uri.cxx | 1 + 2 files changed, 15 insertions(+) (limited to 'sal/rtl') diff --git a/sal/rtl/cipher.cxx b/sal/rtl/cipher.cxx index 192309903b28..959aa8a3a7b3 100644 --- a/sal/rtl/cipher.cxx +++ b/sal/rtl/cipher.cxx @@ -47,12 +47,19 @@ switch ((n)) \ { \ case 8: (xr) = ((sal_uInt32)(*(--(c)))); \ + SAL_FALLTHROUGH; \ case 7: (xr) |= ((sal_uInt32)(*(--(c)))) << 8L; \ + SAL_FALLTHROUGH; \ case 6: (xr) |= ((sal_uInt32)(*(--(c)))) << 16L; \ + SAL_FALLTHROUGH; \ case 5: (xr) |= ((sal_uInt32)(*(--(c)))) << 24L; \ + SAL_FALLTHROUGH; \ case 4: (xl) = ((sal_uInt32)(*(--(c)))); \ + SAL_FALLTHROUGH; \ case 3: (xl) |= ((sal_uInt32)(*(--(c)))) << 8L; \ + SAL_FALLTHROUGH; \ case 2: (xl) |= ((sal_uInt32)(*(--(c)))) << 16L; \ + SAL_FALLTHROUGH; \ case 1: (xl) |= ((sal_uInt32)(*(--(c)))) << 24L; \ } \ } @@ -63,12 +70,19 @@ switch ((n)) \ { \ case 8: *(--(c)) = (sal_uInt8)(((xr) ) & 0xff); \ + SAL_FALLTHROUGH; \ case 7: *(--(c)) = (sal_uInt8)(((xr) >> 8L) & 0xff); \ + SAL_FALLTHROUGH; \ case 6: *(--(c)) = (sal_uInt8)(((xr) >> 16L) & 0xff); \ + SAL_FALLTHROUGH; \ case 5: *(--(c)) = (sal_uInt8)(((xr) >> 24L) & 0xff); \ + SAL_FALLTHROUGH; \ case 4: *(--(c)) = (sal_uInt8)(((xl) ) & 0xff); \ + SAL_FALLTHROUGH; \ case 3: *(--(c)) = (sal_uInt8)(((xl) >> 8L) & 0xff); \ + SAL_FALLTHROUGH; \ case 2: *(--(c)) = (sal_uInt8)(((xl) >> 16L) & 0xff); \ + SAL_FALLTHROUGH; \ case 1: *(--(c)) = (sal_uInt8)(((xl) >> 24L) & 0xff); \ } \ } diff --git a/sal/rtl/uri.cxx b/sal/rtl/uri.cxx index a77eef1ea7e8..aff2c774a6b3 100644 --- a/sal/rtl/uri.cxx +++ b/sal/rtl/uri.cxx @@ -624,6 +624,7 @@ void SAL_CALL rtl_uriDecode(rtl_uString * pText, writeEscapeOctet(pResult, &nCapacity, nUtf32); break; } + SAL_FALLTHROUGH; case EscapeNo: writeUcs4(pResult, &nCapacity, nUtf32); break; -- cgit