diff options
author | Vinson Lee <vlee@freedesktop.org> | 2014-10-27 21:56:58 -0700 |
---|---|---|
committer | Vinson Lee <vlee@freedesktop.org> | 2014-10-28 22:38:19 -0700 |
commit | 59d8d42c824af15a15a4e3e425846a1e716a7fef (patch) | |
tree | 445a1c95ab2ba25474589344c4e1eeda97e1c775 | |
parent | cde5e425a9fbea3978177e74316cb6cb20790b89 (diff) |
varying-packing-simple: Add NORETURN attribute to print_usage_and_exit.
Silence clang sometimes-uninitialized warnings.
simple.c:368:6: warning: variable 'test_type' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
if (all_types[i])
^~~~~~~~~~~~
simple.c:380:30: note: uninitialized use occurs here
piglit_require_GLSL_version(test_type->glsl_version_required);
^~~~~~~~~
simple.c:368:2: note: remove the 'if' if its condition is always true
if (all_types[i])
^~~~~~~~~~~~~~~~~
simple.c:355:35: note: initialize the variable 'test_type' to silence this warning
const struct type_desc *test_type;
^
= NULL
simple.c:374:11: warning: variable 'test_array' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
else if (strcmp(argv[2], "separate") == 0)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
simple.c:385:12: note: uninitialized use occurs here
test_array, max_varying_floats);
^~~~~~~~~~
simple.c:374:7: note: remove the 'if' if its condition is always true
else if (strcmp(argv[2], "separate") == 0)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
simple.c:356:22: note: initialize the variable 'test_array' to silence this warning
GLboolean test_array;
^
= '\0'
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
-rw-r--r-- | tests/spec/glsl-1.10/execution/varying-packing/simple.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/spec/glsl-1.10/execution/varying-packing/simple.c b/tests/spec/glsl-1.10/execution/varying-packing/simple.c index 87ff37e23..6d07a36e6 100644 --- a/tests/spec/glsl-1.10/execution/varying-packing/simple.c +++ b/tests/spec/glsl-1.10/execution/varying-packing/simple.c @@ -335,7 +335,7 @@ choose_varyings(struct varying_desc *varyings, } void -print_usage_and_exit(const char *prog_name) +NORETURN print_usage_and_exit(const char *prog_name) { unsigned i; printf("Usage: %s <type> <arrayspec>\n" |