OSDN Git Service

glsl: fix gcc 8 parenthesis warning
authorMarc Dietrich <marvin24@gmx.de>
Fri, 23 Mar 2018 10:01:23 +0000 (11:01 +0100)
committerTimothy Arceri <tarceri@itsqueeze.com>
Tue, 17 Apr 2018 01:53:59 +0000 (11:53 +1000)
commit268d8f244b3450461de5448f3f9a2ed2aa05e223
treecc32e463c603f3e01ad3358e7ee2996e16bfe57d
parent2a55344e7d2e87a31593e6f0c8432f91159564a4
glsl: fix gcc 8 parenthesis warning

fixes warnings like this:
[184/1137] Compiling C++ object 'src/compiler/glsl/glsl@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@gmx.de>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
src/compiler/glsl/list.h