i965: forward-declare struct brw_context in brw_reg.h
authorIlia Mirkin <imirkin@alum.mit.edu>
Thu, 10 Jul 2014 01:17:32 +0000 (21:17 -0400)
committerIlia Mirkin <imirkin@alum.mit.edu>
Thu, 10 Jul 2014 02:31:51 +0000 (22:31 -0400)
Commit 54e91e7420 introduced a function declaration that uses
brw_context. While brw_context tends to get included in most files, it
is not when compiling intel_asm_annotation.c resulting in the following
warning:

In file included from brw_shader.h:25:0,
                 from brw_cfg.h:32,
                 from intel_asm_annotation.c:24:
brw_reg.h:122:39: warning: 'struct brw_context' declared inside
parameter list [enabled by default]
brw_reg.h:122:39: warning: its scope is only this definition or
declaration, which is probably not what you want [enabled by default]

Add a forward-declaration for struct brw_context to avoid the issue.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/brw_reg.h

index 494ce8c4fa57f0b85d8b247d147d68ade2a43b03..28d3d9433276fdaf5c2e374356b0087c34dee3a7 100644 (file)
@@ -52,6 +52,8 @@
 extern "C" {
 #endif
 
+struct brw_context;
+
 /** Number of general purpose registers (VS, WM, etc) */
 #define BRW_MAX_GRF 128