Build of v4.0.x - warnings

Arran Cudbard-Bell a.cudbardb at freeradius.org
Mon Feb 19 22:34:31 CET 2018


> 
> CC src/main/regex.c
> In file included from src/freeradius-devel/value.h:35:0,
>                 from src/freeradius-devel/dict.h:39,
>                 from src/freeradius-devel/libradius.h:69,
>                 from src/freeradius-devel/radiusd.h:28,
>                 from src/main/regex.c:28:
> src/main/regex.c: In function 'regex_request_to_sub':
> src/freeradius-devel/debug.h:28:19: warning: this statement may fall through [-Wimplicit-fallthrough=]
> #define MEM(x) if (!(x)) { ERROR("%s[%u] OUT OF MEMORY", __FILE__, __LINE__); _fr_exit_now(__FILE__, __LINE__, EXIT_FAILURE); }
>                   ^
> src/main/regex.c:135:3: note: in expansion of macro 'MEM'
>   MEM(NULL);
>   ^~~
> src/main/regex.c:140:2: note: here
>  case PCRE_ERROR_NOSUBSTRING:

GCC bug, but hacked around to shut it up.

>  ^~~~
> In file included from src/freeradius-devel/value.h:35:0,
>                 from src/freeradius-devel/dict.h:39,
>                 from src/freeradius-devel/libradius.h:69,
>                 from src/freeradius-devel/radiusd.h:28,
>                 from src/main/regex.c:28:
> src/main/regex.c: In function 'regex_request_to_sub_named':
> src/freeradius-devel/debug.h:28:19: warning: this statement may fall through [-Wimplicit-fallthrough=]
> #define MEM(x) if (!(x)) { ERROR("%s[%u] OUT OF MEMORY", __FILE__, __LINE__); _fr_exit_now(__FILE__, __LINE__, EXIT_FAILURE); }
>                   ^
> src/main/regex.c:195:3: note: in expansion of macro 'MEM'
>   MEM(NULL);
>   ^~~
> src/main/regex.c:200:2: note: here
>  case PCRE_ERROR_NOSUBSTRING:
>  ^~~~

GCC bug, but hacked around to shut it up.

> CC src/main/xlat_eval.c
> In file included from src/freeradius-devel/io/time.h:32:0,
>                 from src/freeradius-devel/clients.h:33,
>                 from src/freeradius-devel/radiusd.h:60,
>                 from src/main/xlat_eval.c:29:
> src/main/xlat_eval.c: In function 'xlat_frame_eval_repeat':
> src/freeradius-devel/rad_assert.h:43:30: warning: nonnull argument 'child' compared to NULL [-Wnonnull-compare]
> #  define rad_assert(_expr) ((void) ((_expr) ? (void) 0 : (void) fr_assert_exit(__FILE__, __LINE__, #_expr)))
>                             ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> src/main/xlat_eval.c:814:3: note: in expansion of macro 'rad_assert'
>   rad_assert(child);
>   ^~~~~~~~~~

Pedantic, but fixed...

> CC src/modules/rlm_expr/rlm_expr.c
> src/modules/rlm_expr/rlm_expr.c: In function 'fr_pow':
> src/modules/rlm_expr/rlm_expr.c:109:8: warning: this statement may fall through [-Wimplicit-fallthrough=]
>   base *= base;
>   ~~~~~^~~~~~~
> src/modules/rlm_expr/rlm_expr.c:110:2: note: here
>  case 5:
>  ^~~~
> src/modules/rlm_expr/rlm_expr.c:113:8: warning: this statement may fall through [-Wimplicit-fallthrough=]
>   base *= base;
>   ~~~~~^~~~~~~
> src/modules/rlm_expr/rlm_expr.c:114:2: note: here
>  case 4:
>  ^~~~
> src/modules/rlm_expr/rlm_expr.c:117:8: warning: this statement may fall through [-Wimplicit-fallthrough=]
>   base *= base;
>   ~~~~~^~~~~~~
> src/modules/rlm_expr/rlm_expr.c:118:2: note: here
>  case 3:
>  ^~~~
> src/modules/rlm_expr/rlm_expr.c:121:8: warning: this statement may fall through [-Wimplicit-fallthrough=]
>   base *= base;
>   ~~~~~^~~~~~~
> src/modules/rlm_expr/rlm_expr.c:122:2: note: here
>  case 2:
>  ^~~~
> src/modules/rlm_expr/rlm_expr.c:125:8: warning: this statement may fall through [-Wimplicit-fallthrough=]
>   base *= base;
>   ~~~~~^~~~~~~
> src/modules/rlm_expr/rlm_expr.c:126:2: note: here
>  case 1:
>  ^~~~
> src/modules/rlm_expr/rlm_expr.c:127:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
>   if (exp & 1) result *= base;
>      ^
> src/modules/rlm_expr/rlm_expr.c:128:2: note: here
>  default:
>  ^~~~~~~

Yeah yeah...

-Arran
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 874 bytes
Desc: Message signed with OpenPGP
URL: <http://lists.freeradius.org/pipermail/freeradius-devel/attachments/20180219/f4eb91cd/attachment.sig>


More information about the Freeradius-Devel mailing list