Mesa (master): glsl: remove unnecessary parenthesis from macro
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Jul 18 15:34:21 UTC 2018
Module: Mesa
Branch: master
Commit: df8f1637fa08dcf876840a315a5b8461a6ce890a
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=df8f1637fa08dcf876840a315a5b8461a6ce890a
Author: Caio Marcelo de Oliveira Filho <caio.oliveira at intel.com>
Date: Mon Jul 16 13:40:26 2018 -0700
glsl: remove unnecessary parenthesis from macro
The "__inst" will contain the name used for the variable of type
"__type *". Parenthesis is not necessary as the name itself shouldn't
be an expression.
Fixes warning:
In file included from ../../src/mesa/main/mtypes.h:49,
from ../../src/intel/compiler/brw_compiler.h:30,
from ../../src/intel/compiler/brw_shader.h:29,
from ../../src/intel/compiler/brw_fs.h:31,
from ../../src/intel/compiler/brw_fs_cse.cpp:24:
../../src/intel/compiler/brw_fs_cse.cpp: In member function ‘bool fs_visitor::opt_cse_local(bblock_t*)’:
../../src/compiler/glsl/list.h:675:12: warning: unnecessary parentheses in declaration of ‘entry’ [-Wparentheses]
__type *(__inst); \
^
../../src/intel/compiler/brw_fs_cse.cpp:257:10: note: in expansion of macro ‘foreach_in_list_use_after’
foreach_in_list_use_after(aeb_entry, entry, &aeb) {
^~~~~~~~~~~~~~~~~~~~~~~~~
Reviewed-by: Anuj Phogat <anuj.phogat at gmail.com>
---
src/compiler/glsl/list.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/compiler/glsl/list.h b/src/compiler/glsl/list.h
index 2bfa273554..59ed766f2e 100644
--- a/src/compiler/glsl/list.h
+++ b/src/compiler/glsl/list.h
@@ -672,7 +672,7 @@ inline void exec_node::insert_before(exec_list *before)
__node = __prev, __prev = (__type *)__prev->prev)
#define foreach_in_list_use_after(__type, __inst, __list) \
- __type *(__inst); \
+ __type *__inst; \
for ((__inst) = (__type *)(__list)->head_sentinel.next; \
!(__inst)->is_tail_sentinel(); \
(__inst) = (__type *)(__inst)->next)
More information about the mesa-commit
mailing list