varying-packing-simple: Add NORETURN attribute to print_usage_and_exit

Graphics / Mesa 3D Graphics Library / Piglit - Vinson Lee [freedesktop.org] - 29 October 2014 00:38 UTC

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'

59d8d42 varying-packing-simple: Add NORETURN attribute to print_usage_and_exit.
.../glsl-1.10/execution/varying-packing/simple.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Upstream: cgit.freedesktop.org


  • Share