Re: clang -Wimplicit-fallthrough and missing breaks

2016-05-25 Thread Tor Lillqvist
> But it does not handle VK_SPACE specially: > Ah! Missed that, quickly looking. The joy of nested switch statements... --tml ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice

Re: clang -Wimplicit-fallthrough and missing breaks

2016-05-25 Thread Stephan Bergmann
On 05/25/2016 09:24 AM, Markus Mohrhard wrote: That whole WM_KEYDOWN code is unnecessary. You'll take care of that, Moggi? ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice

Re: clang -Wimplicit-fallthrough and missing breaks

2016-05-25 Thread Stephan Bergmann
On 05/25/2016 09:20 AM, Stephan Bergmann wrote: [...] looks rather dubious to me (why mention VK_SPACE explicitly, then?). The code is like that ever since "add anti-aliasing init"; whose author is

Re: clang -Wimplicit-fallthrough and missing breaks

2016-05-25 Thread Markus Mohrhard
Hey, On Wed, May 25, 2016 at 9:20 AM, Stephan Bergmann wrote: > On 05/25/2016 09:01 AM, Tor Lillqvist wrote: > >> >> --- a/vcl/opengl/win/gdiimpl.cxx >> +++ b/vcl/opengl/win/gdiimpl.cxx >> @@ -166,6 +166,7 @@ static LRESULT CALLBACK WndProc(HWND hwnd, >> UINT mess

Re: clang -Wimplicit-fallthrough and missing breaks

2016-05-25 Thread Stephan Bergmann
On 05/25/2016 09:01 AM, Tor Lillqvist wrote: --- 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:

Re: clang -Wimplicit-fallthrough and missing breaks

2016-05-25 Thread Tor Lillqvist
> --- 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:

Re: clang -Wimplicit-fallthrough and missing breaks

2016-05-24 Thread Stephan Bergmann
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 respecti

Re: clang -Wimplicit-fallthrough and missing breaks

2016-05-12 Thread Stephan Bergmann
On 05/12/2016 01:46 PM, Caolán McNamara wrote: On Thu, 2016-05-12 at 10:28 +0200, Stephan Bergmann wrote: * Of course, there may be more lurking in (platform-specific, etc.) code that hasn't yet been built with Clang. (I enabled -Wimplicit-fallthrough also for clang-cl on Windows, but haven't d

Re: clang -Wimplicit-fallthrough and missing breaks

2016-05-12 Thread Caolán McNamara
On Thu, 2016-05-12 at 10:28 +0200, Stephan Bergmann wrote: > * Of course, there may be more lurking in (platform-specific, etc.) > code that hasn't yet been built with Clang.  (I enabled  > -Wimplicit-fallthrough also for clang-cl on Windows, but haven't done > a build with it yet.) Is this "__fal

Re: clang -Wimplicit-fallthrough and missing breaks

2016-05-12 Thread Stephan Bergmann
On 05/09/2016 11:34 AM, Stephan Bergmann wrote: On 05/09/2016 10:54 AM, Caolán McNamara wrote: Does the clang version we use for all the spiffy warnings support -Wimplicit-fallthrough ? I see firefox has a MOZ_FALLTHROUGH macro that expands to [[clang::fallthrough]] for clang and just plain /*f

Re: clang -Wimplicit-fallthrough and missing breaks

2016-05-09 Thread Eike Rathke
Hi Caolán, On Monday, 2016-05-09 09:54:42 +0100, Caolán McNamara wrote: > [... switch case indent ...] Parts of that seem to be what the default Vim C-indent options cause, i.e. switch (foo) { case bar: ... break; case bar: { ... } bre

Re: clang -Wimplicit-fallthrough and missing breaks

2016-05-09 Thread Stephan Bergmann
On 05/09/2016 10:54 AM, Caolán McNamara wrote: Does the clang version we use for all the spiffy warnings support -Wimplicit-fallthrough ? I see firefox has a MOZ_FALLTHROUGH macro that expands to [[clang::fallthrough]] for clang and just plain /*fall-through*/ for everything else. If we had sup