[Tarantool-patches] [PATCH luajit 13/19] ARM: Fix GCC 7 -Wimplicit-fallthrough warnings.
Sergey Kaplun
skaplun at tarantool.org
Wed Aug 16 17:08:05 MSK 2023
Hi, Maxim!
Thanks for the patch!
Fixed your comments inline.
On 15.08.23, Maxim Kokryashkin wrote:
> Hi, Sergey!
> Thanks for the patch!
> LGTM as trivial, except for a few nits, regarding the commit message.
> On Wed, Aug 09, 2023 at 06:36:02PM +0300, Sergey Kaplun via Tarantool-patches wrote:
> > From: Mike Pall <mike>
> >
> > (cherry-picked from commit 9bd5a722bee2ee2c5b159a89937778b81be49915)
> >
> > This patch adds the `/* fallthrough */` comments elsewhere, where it was
> Typo: s/where it was/where they were/
Fixed.
> > missing for the ARM build, so the `-Wimplicit-fallthrough` [1] warning
> > is trigerred.
> Typo: s/is trigerred/is not triggered/
Fixed, thanks!
> >
> > Also, this commits sets the correspoinding flag in the
> Typo: s/commits/commit/
> Typo: s/in the/in/
Fixed.
> > <cmake/SetTargetFlags.cmake>.
> >
> > [1]: https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wimplicit-fallthrough
> >
> > Sergey Kaplun:
> > * added the description for the commit
> >
> > Part of tarantool/tarantool#8825
> > ---
Also added the following patch to be consisted with our codestyle in
CMake.
===================================================================
diff --git a/cmake/SetTargetFlags.cmake b/cmake/SetTargetFlags.cmake
index d309989e..d6ee1693 100644
--- a/cmake/SetTargetFlags.cmake
+++ b/cmake/SetTargetFlags.cmake
@@ -9,7 +9,7 @@
include(CheckUnwindTables)
# Clang does not recognize comment markers.
-if (CMAKE_C_COMPILER_ID STREQUAL "GNU"
+if(CMAKE_C_COMPILER_ID STREQUAL "GNU"
AND CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL "7.1")
AppendFlags(TARGET_C_FLAGS -Wimplicit-fallthrough)
endif()
===================================================================
<snipped>
> >
--
Best regards,
Sergey Kaplun
More information about the Tarantool-patches
mailing list