[LTP] [PATCH 1/1] Remove break after return

Petr Vorel pvorel@suse.cz
Fri Apr 5 08:48:30 CEST 2019


Hi,

> > > Can we also remove break after calling tst_brk()?

> > AFAIK that would generate warnings, since compiler cannot deduce on it's
> > own that the call will not return.
> Agree.

patchset merged (short variant).

NOTE: Warning is produced only on gcc (to my surprise only new versions: up to
gcc 6 it's ok, 7 and 8 warns):
In file included from variant.c:6:
variant.c: In function ‘do_test’:
../../include/tst_test.h:76:3: warning: this statement may fall through [-Wimplicit-fallthrough=]
   tst_brk_(__FILE__, __LINE__, (ttype), (arg_fmt), ##__VA_ARGS__);\
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
variant.c:13:3: note: in expansion of macro ‘tst_brk’
   tst_brk(TCONF, "Test skipped");

Kind regards,
Petr


More information about the ltp mailing list