clang -Wimplicit-fallthrough and missing breaks

Stephan Bergmann sbergman at redhat.com
Wed May 25 06:49:34 UTC 2016


On 05/12/2016 10:28 AM, Stephan Bergmann wrote:
> * A handful of places where there was no fallthrough comment looked
> dubious to me:

Did a clang-cl build on Windows now and found another two dubious cases 
in Windows-only code (below).  Again: "Would be great if people knowing 
about the respective code areas could look into these, and either change 
them into plain 'SAL_FALLTHROUGH;' or 'break;'."  Thanks.

> commit 3ec901fab2cb3e1a1c8222498761e72c28175bd3
> Author: Stephan Bergmann <sbergman at redhat.com>
> Date:   Wed May 25 08:38:19 2016 +0200
>
>     Mark dubious fallthrough cases as "SAL_FALLTHROUGH; //TODO ???" (in Win-only)
>
>     Change-Id: If5ee201aab8c4451971a11ea7d7ff943c9a1a726
>
> diff --git a/vcl/opengl/win/gdiimpl.cxx b/vcl/opengl/win/gdiimpl.cxx
> index 4b3e836..40c6b68 100644
> --- a/vcl/opengl/win/gdiimpl.cxx
> +++ b/vcl/opengl/win/gdiimpl.cxx
> @@ -166,6 +166,7 @@ static LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM l
>          case VK_SPACE:
>              break;
>          }
> +        SAL_FALLTHROUGH; //TODO ???
>      default:
>          return DefWindowProc(hwnd, message, wParam, lParam);
>      }
> diff --git a/winaccessibility/source/service/AccContainerEventListener.cxx b/winaccessibility/source/service/AccContainerEventListener.cxx
> index 194bf3e..1949e94 100644
> --- a/winaccessibility/source/service/AccContainerEventListener.cxx
> +++ b/winaccessibility/source/service/AccContainerEventListener.cxx
> @@ -64,6 +64,7 @@ throw (css::uno::RuntimeException)
>          break;
>      case AccessibleEventId::TEXT_CHANGED:
>          HandleTextChangedEvent(aEvent.OldValue, aEvent.NewValue);
> +        SAL_FALLTHROUGH; //TODO ???
>      case AccessibleEventId::VISIBLE_DATA_CHANGED:
>          HandleVisibleDataChangedEvent();
>          break;



More information about the LibreOffice mailing list