[Mesa-dev] [PATCH] fix gcc 8 parenthesis warning

Emil Velikov emil.l.velikov at gmail.com
Fri Mar 23 10:24:20 UTC 2018


On 23 March 2018 at 10:01, Marc Dietrich <marvin24 at gmx.de> wrote:
> fixes warnings like this:
> [184/1137] Compiling C++ object 'src/compiler/glsl/glsl at sta/lower_jumps.cpp.o'.
> In file included from ../src/mesa/main/mtypes.h:48,
>                  from ../src/compiler/glsl_types.h:149,
>                  from ../src/compiler/glsl/lower_jumps.cpp:59:
> ../src/compiler/glsl/lower_jumps.cpp: In member function '{anonymous}::block_record {anonymous}::ir_lower_jumps_visitor::visit_block(exec_list*)':
> ../src/compiler/glsl/list.h:650:17: warning: unnecessary parentheses in declaration of 'node' [-Wparentheses]
>     for (__type *(__inst) = (__type *)(__list)->head_sentinel.next; \
>                  ^
> ../src/compiler/glsl/lower_jumps.cpp:510:7: note: in expansion of macro 'foreach_in_list'
>        foreach_in_list(ir_instruction, node, list) {
>        ^~~~~~~~~~~~~~~
>
> Signed-off-by: Marc Dietrich <marvin24 at gmx.de>

Reviewed-by: Emil Velikov <emil.velikov at collabora.com>

-Emil


More information about the mesa-dev mailing list