summaryrefslogtreecommitdiff
path: root/src/glsl/ast_to_hir.cpp
diff options
context:
space:
mode:
authorIan Romanick <ian.d.romanick@intel.com>2013-11-27 11:22:27 -0800
committerIan Romanick <ian.d.romanick@intel.com>2013-12-09 17:27:40 -0800
commitb531dcaec45a9c7a9fbbf8410dbc7008823e5ebc (patch)
tree75a6e0dfc21d98e3c24c77d99b783362117e1811 /src/glsl/ast_to_hir.cpp
parentb160fea306b1f922d7699bf1c91f39e0a2797734 (diff)
glsl: Don't emit empty declaration warning for a struct specifier
The intention is that things like int; will generate a warning. However, we were also accidentally emitting the same warning for things like struct Foo { int x; }; Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=68838 Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Cc: Aras Pranckevicius <aras@unity3d.com> Cc: "9.2 10.0" <mesa-stable@lists.freedesktop.org> (cherry picked from commit 758658850bd5ba64bf2e8c04516ea1292aedcfc3)
Diffstat (limited to 'src/glsl/ast_to_hir.cpp')
-rw-r--r--src/glsl/ast_to_hir.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp
index 01280478c95..48c621fe8a8 100644
--- a/src/glsl/ast_to_hir.cpp
+++ b/src/glsl/ast_to_hir.cpp
@@ -2934,7 +2934,7 @@ ast_declarator_list::hir(exec_list *instructions,
precision_names[this->type->qualifier.precision],
type_name);
}
- } else {
+ } else if (this->type->specifier->structure == NULL) {
_mesa_glsl_warning(&loc, state, "empty declaration");
}
}