summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVinson Lee <vlee@freedesktop.org>2014-10-19 13:23:58 -0700
committerVinson Lee <vlee@freedesktop.org>2014-10-20 17:04:55 -0700
commit1e56b8f5503ce8916d62775499b58931c2b14e22 (patch)
treef900b8418ce992bce0cc98440770bf948974751b
parentf28414398830dd47ecfbcf026526604ce40b81ee (diff)
ext_framebuffer_multisample: Add NORETURN attribute to print_usage_and_exit.
Silence clang sometimes-uninitialized warnings. unaligned-blit.cpp:161:13: warning: variable 'src_samples' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized] } else if (strcmp(argv[3], "downsample") == 0) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ unaligned-blit.cpp:171:26: note: uninitialized use occurs here src_fbo.setup(FboConfig(src_samples, pattern_size, pattern_size)); ^~~~~~~~~~~ unaligned-blit.cpp:161:9: note: remove the 'if' if its condition is always true } else if (strcmp(argv[3], "downsample") == 0) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ unaligned-blit.cpp:121:17: note: initialize the variable 'src_samples' to silence this warning int src_samples; ^ = 0 unaligned-blit.cpp:161:13: warning: variable 'dst_samples' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized] } else if (strcmp(argv[3], "downsample") == 0) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ unaligned-blit.cpp:172:26: note: uninitialized use occurs here dst_fbo.setup(FboConfig(dst_samples, pattern_size, pattern_size)); ^~~~~~~~~~~ unaligned-blit.cpp:161:9: note: remove the 'if' if its condition is always true } else if (strcmp(argv[3], "downsample") == 0) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ unaligned-blit.cpp:122:17: note: initialize the variable 'dst_samples' to silence this warning int dst_samples; ^ = 0 Signed-off-by: Vinson Lee <vlee@freedesktop.org> Reviewed-by: Brian Paul <brianp@vmware.com>
-rw-r--r--tests/spec/ext_framebuffer_multisample/unaligned-blit.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/spec/ext_framebuffer_multisample/unaligned-blit.cpp b/tests/spec/ext_framebuffer_multisample/unaligned-blit.cpp
index d18f3dded..4237b50ce 100644
--- a/tests/spec/ext_framebuffer_multisample/unaligned-blit.cpp
+++ b/tests/spec/ext_framebuffer_multisample/unaligned-blit.cpp
@@ -99,7 +99,7 @@ scrambling_blit(const int *permutation)
}
void
-print_usage_and_exit(char *prog_name)
+NORETURN print_usage_and_exit(char *prog_name)
{
printf("Usage: %s <num_samples> <buffer_type> <blit_type>\n"
" where <buffer_type> is one of:\n"