[Tarantool-patches] [PATCH] test: fix warning for old gcc at testgetmetrics.c

Sergey Ostanevich sergos at tarantool.org
Tue Oct 20 15:44:36 MSK 2020


Hi!

The patch is LGTM, wording in the commit message still needs updates
(the latest branch log below).

Sergos

> commit 7a4c686e61bb70defe56e4e823ae09ce98c8dc04 (HEAD -> skaplun/gh-5187-old-gcc-warning, origin/skaplun/gh-5187-old-gcc-warning)
> Author: Sergey Kaplun <skaplun at tarantool.org>
> Date:   Sat Oct 17 09:13:07 2020 +0300
> 
>     test: fix warning for old gcc at testgetmetrics.c
> 
>     This patch fixes the regression introduced in scope of
>     5a61e1ab54b5c66bfebd836db1ac47996611e065 ('misc: add C and Lua
>     API for platform metrics').
> 
>     Old gcc compiler (gcc-4.8.5-39) throws warnings like:
>     "error: comparison is always true due to limited range of data type
>     [-Werror=type-limits]", when you cast syze_t value to ssyze_t type and

size instead of syze

>     compare its to >= 0. This leads to failing compilation with -Werror

compare it, not its

>     flag.
> 
>     Taking into account that this base test check only API format, not
>     values by themself, it will be enough to use (void) construction here.

by themself -> themselves

> 
>     Follows up tarantool/tarantool#5187
> 



More information about the Tarantool-patches mailing list