diff options
author | Marek Olšák <marek.olsak@amd.com> | 2016-04-21 13:12:17 +0200 |
---|---|---|
committer | Marek Olšák <marek.olsak@amd.com> | 2016-05-09 16:25:29 +0200 |
commit | 03284538b628e8c312313ec006ada90518c1c192 (patch) | |
tree | 20f04605d464369acc36189eb43b3d850766605e | |
parent | b4191ccae328224a5fe7a9b228f7c389a18edd17 (diff) |
Fix asprintf warnings
78 files changed, 158 insertions, 158 deletions
diff --git a/tests/general/clipflat.c b/tests/general/clipflat.c index 4a4f06a65..bff7f0f1f 100644 --- a/tests/general/clipflat.c +++ b/tests/general/clipflat.c @@ -354,7 +354,7 @@ calcQuadrant(GLfloat x, GLfloat y) assert(0); } - asprintf(&ret, "%s %s", strx, stry); + (void)!asprintf(&ret, "%s %s", strx, stry); return ret; } diff --git a/tests/general/object-namespace-pollution.c b/tests/general/object-namespace-pollution.c index cbf49cfde..1c7501443 100644 --- a/tests/general/object-namespace-pollution.c +++ b/tests/general/object-namespace-pollution.c @@ -402,7 +402,7 @@ generate_program_source(GLenum target, unsigned key) ; } - asprintf(&source, + (void)!asprintf(&source, "!!ARBvp1.0\n" "# Program key 0x%04x\n" "ATTRIB vp = vertex.position;\n" @@ -451,7 +451,7 @@ generate_program_source(GLenum target, unsigned key) half_dir = "state.light[0].half"; } - asprintf(&source, + (void)!asprintf(&source, "!!ARBfp1.0\n" "# Program key 0x%04x\n" "ATTRIB n = fragment.texcoord[0];\n" diff --git a/tests/shaders/built-in-constants.c b/tests/shaders/built-in-constants.c index fb728d399..b1951fb0b 100644 --- a/tests/shaders/built-in-constants.c +++ b/tests/shaders/built-in-constants.c @@ -490,7 +490,7 @@ piglit_init(int argc, char **argv) /* Generate the version declaration that will be used by all of the * shaders in the test run. */ - asprintf(&version_string, + (void)!asprintf(&version_string, "#version %s\n" "%s" "#ifdef GL_ES\n" @@ -499,7 +499,7 @@ piglit_init(int argc, char **argv) required_glsl_version_string, extension_enables); - asprintf(&passthrough_version_string, + (void)!asprintf(&passthrough_version_string, "#version %s\n" "#ifdef GL_ES\n" "precision mediump float;\n" diff --git a/tests/shaders/version-mixing.c b/tests/shaders/version-mixing.c index 8d7016c64..b4f7199b0 100644 --- a/tests/shaders/version-mixing.c +++ b/tests/shaders/version-mixing.c @@ -186,7 +186,7 @@ try_attach_shader(GLuint prog, const char *shader_desc, GLenum target, GLuint shader = glCreateShader(target); GLint ok; - asprintf(&shader_text, shader_template, version); + (void)!asprintf(&shader_text, shader_template, version); glShaderSource(shader, 1, (const GLchar **) &shader_text, NULL); free(shader_text); glCompileShader(shader); diff --git a/tests/spec/arb_compute_shader/common.c b/tests/spec/arb_compute_shader/common.c index c2d98b74d..5fc16236e 100644 --- a/tests/spec/arb_compute_shader/common.c +++ b/tests/spec/arb_compute_shader/common.c @@ -39,7 +39,7 @@ concat(char *hunk0, ...) while ((hunk = va_arg(ap, char *))) { char *t = s; - asprintf(&s, "%s\n%s", t, hunk); + (void)!asprintf(&s, "%s\n%s", t, hunk); free(t); free(hunk); } @@ -57,7 +57,7 @@ generate_cs_prog(unsigned x, unsigned y, unsigned z, char *ext, if (ext == NULL) ext = hunk(""); - asprintf(&source, + (void)!asprintf(&source, "#version 330\n" "#extension GL_ARB_compute_shader : enable\n" "%s\n" diff --git a/tests/spec/arb_compute_shader/compiler/work_group_size_too_large.c b/tests/spec/arb_compute_shader/compiler/work_group_size_too_large.c index 5c73cfad1..d0cee473a 100644 --- a/tests/spec/arb_compute_shader/compiler/work_group_size_too_large.c +++ b/tests/spec/arb_compute_shader/compiler/work_group_size_too_large.c @@ -79,7 +79,7 @@ test_work_group_size(GLint *size, bool expect_ok) printf("Sizes %d, %d, %d should %s: ", size[0], size[1], size[2], expect_ok ? "compile successfully" : "produce a compile error"); - asprintf(&shader_text, cs_template, size[0], size[1], size[2]); + (void)!asprintf(&shader_text, cs_template, size[0], size[1], size[2]); shader = glCreateShader(GL_COMPUTE_SHADER); glShaderSource(shader, 1, (const GLchar **) &shader_text, NULL); glCompileShader(shader); diff --git a/tests/spec/arb_direct_state_access/copytexturesubimage.c b/tests/spec/arb_direct_state_access/copytexturesubimage.c index 096c266b6..f168a342c 100644 --- a/tests/spec/arb_direct_state_access/copytexturesubimage.c +++ b/tests/spec/arb_direct_state_access/copytexturesubimage.c @@ -292,8 +292,8 @@ piglit_init(int argc, char **argv) piglit_get_glsl_version(&es, &major, &minor); ver = ((major * 100 + minor) >= 140) ? "140" : "110"; - asprintf(&vs_source, vs_template, ver); - asprintf(&fs_source, fs_template, ver); + (void)!asprintf(&vs_source, vs_template, ver); + (void)!asprintf(&fs_source, fs_template, ver); builder_prog = piglit_build_simple_program(vs_source, fs_source); diff --git a/tests/spec/arb_direct_state_access/dsa-utils.c b/tests/spec/arb_direct_state_access/dsa-utils.c index 727751d14..972d737e3 100644 --- a/tests/spec/arb_direct_state_access/dsa-utils.c +++ b/tests/spec/arb_direct_state_access/dsa-utils.c @@ -143,19 +143,19 @@ dsa_create_program(GLenum target) piglit_get_glsl_version(&es, &major, &minor); ver = ((major * 100 + minor) >= 140) ? "140" : "110"; - asprintf(&vs_source, vs_template, ver); + (void)!asprintf(&vs_source, vs_template, ver); switch (target) { case GL_TEXTURE_1D: - asprintf(&fs_source, fs_1d_template, ver); + (void)!asprintf(&fs_source, fs_1d_template, ver); break; case GL_TEXTURE_2D: - asprintf(&fs_source, fs_2d_template, ver); + (void)!asprintf(&fs_source, fs_2d_template, ver); break; case GL_TEXTURE_3D: - asprintf(&fs_source, fs_3d_template, ver); + (void)!asprintf(&fs_source, fs_3d_template, ver); break; case GL_TEXTURE_RECTANGLE_ARB: - asprintf(&fs_source, fs_rect_template, ver); + (void)!asprintf(&fs_source, fs_rect_template, ver); break; default: fprintf(stderr, "Invalid texture target in %s\n", __func__); diff --git a/tests/spec/arb_enhanced_layouts/transform-feedback-layout-qualifiers.c b/tests/spec/arb_enhanced_layouts/transform-feedback-layout-qualifiers.c index 9d029e683..b51a1ac4e 100644 --- a/tests/spec/arb_enhanced_layouts/transform-feedback-layout-qualifiers.c +++ b/tests/spec/arb_enhanced_layouts/transform-feedback-layout-qualifiers.c @@ -196,7 +196,7 @@ build_and_use_program(unsigned gs_invocation_n, const char *vs_text) } else { char *gs_text; - asprintf(&gs_text, gs_text_two_sets_tmpl, gs_invocation_n); + (void)!asprintf(&gs_text, gs_text_two_sets_tmpl, gs_invocation_n); prog = piglit_build_simple_program_multiple_shaders( GL_VERTEX_SHADER, vs_pass_thru_text, GL_GEOMETRY_SHADER, gs_text, 0); diff --git a/tests/spec/arb_explicit_attrib_location/overlapping-locations-input-attribs.c b/tests/spec/arb_explicit_attrib_location/overlapping-locations-input-attribs.c index 1eb9413c1..288d49d62 100644 --- a/tests/spec/arb_explicit_attrib_location/overlapping-locations-input-attribs.c +++ b/tests/spec/arb_explicit_attrib_location/overlapping-locations-input-attribs.c @@ -102,7 +102,7 @@ compile_shader(void) "}\n"; char *vert; - asprintf(&vert, vert_template, locations_in_shader ? + (void)!asprintf(&vert, vert_template, locations_in_shader ? "#extension GL_ARB_explicit_attrib_location : require\n" "layout (location = 0) in vec2 vertex;\n" "layout (location = 1) in vec3 color0;\n" diff --git a/tests/spec/arb_framebuffer_object/fbo-drawbuffers-none.c b/tests/spec/arb_framebuffer_object/fbo-drawbuffers-none.c index f7ddb450b..591edbc5b 100644 --- a/tests/spec/arb_framebuffer_object/fbo-drawbuffers-none.c +++ b/tests/spec/arb_framebuffer_object/fbo-drawbuffers-none.c @@ -132,7 +132,7 @@ create_shaders(void) GL_FRAGMENT_SHADER, fs_write_red, 0); - asprintf(&fs_write_different, fs_template_write_different, + (void)!asprintf(&fs_write_different, fs_template_write_different, fs_uses_out_variables ? "#version 130 \nout vec4[4] color;" : "", fs_uses_out_variables ? "color" : "gl_FragData"); diff --git a/tests/spec/arb_geometry_shader4/execution/program-parameter/vertices-out.c b/tests/spec/arb_geometry_shader4/execution/program-parameter/vertices-out.c index aba638d60..4d23526a4 100644 --- a/tests/spec/arb_geometry_shader4/execution/program-parameter/vertices-out.c +++ b/tests/spec/arb_geometry_shader4/execution/program-parameter/vertices-out.c @@ -235,13 +235,13 @@ piglit_init(int argc, char **argv) gs_string = gs_text; fs_string = fs_text; } else { - asprintf((char **)&gs_string, + (void)!asprintf((char **)&gs_string, "#extension GL_ARB_geometry_shader4: enable\n" "const int n = %d;\n%s", components, gs_text_var); if (transform_feedback) fs_string = NULL; else - asprintf((char **)&fs_string, + (void)!asprintf((char **)&fs_string, "const int n = %d;\n%s", components, fs_text_var); } diff --git a/tests/spec/arb_gpu_shader5/compiler/invocations_count_too_large.c b/tests/spec/arb_gpu_shader5/compiler/invocations_count_too_large.c index cf0dd5fdc..9c6c643fc 100644 --- a/tests/spec/arb_gpu_shader5/compiler/invocations_count_too_large.c +++ b/tests/spec/arb_gpu_shader5/compiler/invocations_count_too_large.c @@ -74,7 +74,7 @@ test_invocations_size(GLint size, bool expect_ok) printf("Invocation count of %d should %s: ", size, expect_ok ? "compile successfully" : "produce a compile error"); - asprintf(&shader_text, gs_template, size); + (void)!asprintf(&shader_text, gs_template, size); shader = glCreateShader(GL_GEOMETRY_SHADER); glShaderSource(shader, 1, (const GLchar **) &shader_text, NULL); glCompileShader(shader); diff --git a/tests/spec/arb_gpu_shader5/compiler/stream-qualifier/stream_value_too_large.c b/tests/spec/arb_gpu_shader5/compiler/stream-qualifier/stream_value_too_large.c index ec2390ba3..1454c0048 100644 --- a/tests/spec/arb_gpu_shader5/compiler/stream-qualifier/stream_value_too_large.c +++ b/tests/spec/arb_gpu_shader5/compiler/stream-qualifier/stream_value_too_large.c @@ -99,7 +99,7 @@ compile_shaders(GLint size, bool expect_ok, GLint *ok) expect_ok ? "compile successfully" : "produce a compile error"); - asprintf(&shader_text, gs_template, size); + (void)!asprintf(&shader_text, gs_template, size); shader = glCreateShader(GL_GEOMETRY_SHADER); glShaderSource(shader, 1, (const GLchar **) &shader_text, NULL); glCompileShader(shader); diff --git a/tests/spec/arb_gpu_shader5/execution/xfb-streams-without-invocations.c b/tests/spec/arb_gpu_shader5/execution/xfb-streams-without-invocations.c index e2a34554a..d163fafff 100644 --- a/tests/spec/arb_gpu_shader5/execution/xfb-streams-without-invocations.c +++ b/tests/spec/arb_gpu_shader5/execution/xfb-streams-without-invocations.c @@ -166,7 +166,7 @@ probe_buffers(const GLuint *xfb, const GLuint *queries, unsigned primitive_n) /* Skip Stream = 3 as it has no primitives written nor generated */ for (i = 0; i < STREAMS-1; ++i) { char *name; - asprintf(&name, "stream%d", i); + (void)!asprintf(&name, "stream%d", i); pass = piglit_probe_buffer(xfb[i], GL_TRANSFORM_FEEDBACK_BUFFER, name, 1, expected_n[i], expected[i]); free(name); diff --git a/tests/spec/arb_gpu_shader5/execution/xfb-streams.c b/tests/spec/arb_gpu_shader5/execution/xfb-streams.c index 0957587a3..9aa36c352 100644 --- a/tests/spec/arb_gpu_shader5/execution/xfb-streams.c +++ b/tests/spec/arb_gpu_shader5/execution/xfb-streams.c @@ -148,7 +148,7 @@ build_and_use_program(GLint gs_invocation_n, const char *gs_template, char *gs_text; - asprintf(&gs_text, gs_template, gs_invocation_n); + (void)!asprintf(&gs_text, gs_template, gs_invocation_n); prog = piglit_build_simple_program_multiple_shaders( GL_VERTEX_SHADER, vs_pass_thru_text, GL_GEOMETRY_SHADER, gs_text, 0); @@ -222,7 +222,7 @@ probe_buffers(const GLuint *xfb, const GLuint *queries, unsigned primitive_n) for (i = 0; i < STREAMS; ++i) { char *name; - asprintf(&name, "stream%d", i); + (void)!asprintf(&name, "stream%d", i); pass = piglit_probe_buffer(xfb[i], GL_TRANSFORM_FEEDBACK_BUFFER, name, 1, expected_n[i], expected[i]); free(name); diff --git a/tests/spec/arb_gpu_shader5/linker/emitstreamvertex_stream_too_large.c b/tests/spec/arb_gpu_shader5/linker/emitstreamvertex_stream_too_large.c index cd2626f19..423eafa4e 100644 --- a/tests/spec/arb_gpu_shader5/linker/emitstreamvertex_stream_too_large.c +++ b/tests/spec/arb_gpu_shader5/linker/emitstreamvertex_stream_too_large.c @@ -106,7 +106,7 @@ piglit_init(int argc, char **argv) glShaderSource(fs, 1, (const GLchar **) &fs_source, NULL); glCompileShader(fs); - asprintf(&shader_text, gs_template, max_streams, max_streams); + (void)!asprintf(&shader_text, gs_template, max_streams, max_streams); gs = glCreateShader(GL_GEOMETRY_SHADER); glShaderSource(gs, 1, (const GLchar **) &shader_text, NULL); glCompileShader(gs); diff --git a/tests/spec/arb_pipeline_statistics_query/pipeline_stats_comp.c b/tests/spec/arb_pipeline_statistics_query/pipeline_stats_comp.c index 3c511f1fe..5bfcc76aa 100644 --- a/tests/spec/arb_pipeline_statistics_query/pipeline_stats_comp.c +++ b/tests/spec/arb_pipeline_statistics_query/pipeline_stats_comp.c @@ -87,7 +87,7 @@ dispatch_size(uint32_t x, uint32_t y, uint32_t z) glDeleteProgram(prog); } - asprintf(&compute_shader, compute_shader_template, x, y, z); + (void)!asprintf(&compute_shader, compute_shader_template, x, y, z); glShaderSource(shader, 1, (const GLchar **) &compute_shader, diff --git a/tests/spec/arb_sample_shading/execution/builtin-gl-sample-id.cpp b/tests/spec/arb_sample_shading/execution/builtin-gl-sample-id.cpp index e5681d4c1..22265cfd2 100644 --- a/tests/spec/arb_sample_shading/execution/builtin-gl-sample-id.cpp +++ b/tests/spec/arb_sample_shading/execution/builtin-gl-sample-id.cpp @@ -108,11 +108,11 @@ compile_shader(void) char *frag_1; if (num_samples) - asprintf(&frag_1, frag_template, + (void)!asprintf(&frag_1, frag_template, "#extension GL_ARB_texture_multisample : require", "isampler2DMS", ", i"); else - asprintf(&frag_1, frag_template, "", "isampler2DRect", ""); + (void)!asprintf(&frag_1, frag_template, "", "isampler2DRect", ""); prog_1 = piglit_build_simple_program(vert, frag_1); if (!piglit_link_check_status(prog_1)) { diff --git a/tests/spec/arb_sample_shading/execution/builtin-gl-sample-mask-simple.cpp b/tests/spec/arb_sample_shading/execution/builtin-gl-sample-mask-simple.cpp index 735a43869..2fc9c44ed 100644 --- a/tests/spec/arb_sample_shading/execution/builtin-gl-sample-mask-simple.cpp +++ b/tests/spec/arb_sample_shading/execution/builtin-gl-sample-mask-simple.cpp @@ -101,11 +101,11 @@ compile_shader(void) char *frag_1; if (num_samples) - asprintf(&frag_1, frag_template, + (void)!asprintf(&frag_1, frag_template, "#extension GL_ARB_texture_multisample : require", "sampler2DMS", ", i"); else - asprintf(&frag_1, frag_template, "", "sampler2DRect", ""); + (void)!asprintf(&frag_1, frag_template, "", "sampler2DRect", ""); prog_1 = piglit_build_simple_program(vert, frag_1); if (!piglit_link_check_status(prog_1)) { diff --git a/tests/spec/arb_sample_shading/execution/builtin-gl-sample-mask.cpp b/tests/spec/arb_sample_shading/execution/builtin-gl-sample-mask.cpp index 6c6cf925a..fe8a73901 100644 --- a/tests/spec/arb_sample_shading/execution/builtin-gl-sample-mask.cpp +++ b/tests/spec/arb_sample_shading/execution/builtin-gl-sample-mask.cpp @@ -122,11 +122,11 @@ compile_shader(void) char *frag_1; if (num_samples) - asprintf(&frag_1, frag_template, + (void)!asprintf(&frag_1, frag_template, "#extension GL_ARB_texture_multisample : require", "sampler2DMS", ", i"); else - asprintf(&frag_1, frag_template, "", "sampler2DRect", ""); + (void)!asprintf(&frag_1, frag_template, "", "sampler2DRect", ""); prog_1 = piglit_build_simple_program(vert, frag_1); if (!piglit_link_check_status(prog_1)) { diff --git a/tests/spec/arb_separate_shader_objects/400-combinations.c b/tests/spec/arb_separate_shader_objects/400-combinations.c index a78a4cc94..5f84cb149 100644 --- a/tests/spec/arb_separate_shader_objects/400-combinations.c +++ b/tests/spec/arb_separate_shader_objects/400-combinations.c @@ -237,7 +237,7 @@ piglit_init(int argc, char **argv) char *source = NULL; - asprintf(&source, vs_code, + (void)!asprintf(&source, vs_code, glsl_version, location, vertex_name, @@ -259,7 +259,7 @@ piglit_init(int argc, char **argv) for (i = 0; i < ARRAY_SIZE(fs_programs); i++) { char *source = NULL; - asprintf(&source, fs_code, + (void)!asprintf(&source, fs_code, glsl_version, location, fragment_name, diff --git a/tests/spec/arb_separate_shader_objects/ActiveShaderProgram-invalid-program.c b/tests/spec/arb_separate_shader_objects/ActiveShaderProgram-invalid-program.c index 0fc000353..85eae229e 100644 --- a/tests/spec/arb_separate_shader_objects/ActiveShaderProgram-invalid-program.c +++ b/tests/spec/arb_separate_shader_objects/ActiveShaderProgram-invalid-program.c @@ -80,7 +80,7 @@ piglit_init(int argc, char **argv) glBindProgramPipeline(pipe); - asprintf(&source, vs_code_template, glsl_version); + (void)!asprintf(&source, vs_code_template, glsl_version); vs_prog = glCreateShaderProgramv(GL_VERTEX_SHADER, 1, (const GLchar *const *) &source); piglit_link_check_status(vs_prog); diff --git a/tests/spec/arb_separate_shader_objects/GetProgramPipelineiv.c b/tests/spec/arb_separate_shader_objects/GetProgramPipelineiv.c index 61ff3e78d..1975180f6 100644 --- a/tests/spec/arb_separate_shader_objects/GetProgramPipelineiv.c +++ b/tests/spec/arb_separate_shader_objects/GetProgramPipelineiv.c @@ -223,7 +223,7 @@ piglit_init(int argc, char **argv) ver = 110; } - asprintf(&version, + (void)!asprintf(&version, "#version %d\n" "#extension GL_ARB_separate_shader_objects: enable\n\n", ver); diff --git a/tests/spec/arb_separate_shader_objects/ValidateProgramPipeline.c b/tests/spec/arb_separate_shader_objects/ValidateProgramPipeline.c index d129517d4..485b06a29 100644 --- a/tests/spec/arb_separate_shader_objects/ValidateProgramPipeline.c +++ b/tests/spec/arb_separate_shader_objects/ValidateProgramPipeline.c @@ -259,11 +259,11 @@ piglit_init(int argc, char **argv) pass = true; /* create the shader program */ - asprintf(&vs_source, vs_source_template, version); - asprintf(&fs_source, fs_source_template, version); - asprintf(&gs_source, gs_source_template, version); - asprintf(&te_source, te_source_template, version); - asprintf(&tc_source, tc_source_template, version); + (void)!asprintf(&vs_source, vs_source_template, version); + (void)!asprintf(&fs_source, fs_source_template, version); + (void)!asprintf(&gs_source, gs_source_template, version); + (void)!asprintf(&te_source, te_source_template, version); + (void)!asprintf(&tc_source, tc_source_template, version); vs = piglit_compile_shader_text(GL_VERTEX_SHADER, vs_source); fs = piglit_compile_shader_text(GL_FRAGMENT_SHADER, fs_source); diff --git a/tests/spec/arb_separate_shader_objects/rendezvous_by_location.c b/tests/spec/arb_separate_shader_objects/rendezvous_by_location.c index fcbfede76..a3e37c03d 100644 --- a/tests/spec/arb_separate_shader_objects/rendezvous_by_location.c +++ b/tests/spec/arb_separate_shader_objects/rendezvous_by_location.c @@ -150,20 +150,20 @@ void piglit_init(int argc, char **argv) glsl_version = pick_a_glsl_version(); - asprintf(&source, vs_code_template, glsl_version); + (void)!asprintf(&source, vs_code_template, glsl_version); vs_prog = glCreateShaderProgramv(GL_VERTEX_SHADER, 1, (const GLchar *const *) &source); piglit_link_check_status(vs_prog); free(source); - asprintf(&source, fs_code_same_declaration_order_template, glsl_version); + (void)!asprintf(&source, fs_code_same_declaration_order_template, glsl_version); fs_prog_same_declaration_order = glCreateShaderProgramv(GL_FRAGMENT_SHADER, 1, (const GLchar *const *) &source); piglit_link_check_status(fs_prog_same_declaration_order); free(source); - asprintf(&source, fs_code_same_location_order_template, glsl_version); + (void)!asprintf(&source, fs_code_same_location_order_template, glsl_version); fs_prog_same_location_order = glCreateShaderProgramv(GL_FRAGMENT_SHADER, 1, (const GLchar *const *) &source); diff --git a/tests/spec/arb_separate_shader_objects/rendezvous_by_name.c b/tests/spec/arb_separate_shader_objects/rendezvous_by_name.c index 48caf0a06..b03e6288b 100644 --- a/tests/spec/arb_separate_shader_objects/rendezvous_by_name.c +++ b/tests/spec/arb_separate_shader_objects/rendezvous_by_name.c @@ -279,8 +279,8 @@ void piglit_init(int argc, char **argv) fs_prog_1_in = format_and_link_program(GL_FRAGMENT_SHADER, fs_code_1_in_template, glsl_version); - asprintf(&vs_source, vs_code_inactive_template, glsl_version, max_varying); - asprintf(&fs_source, fs_code_inactive_template, glsl_version, max_varying); + (void)!asprintf(&vs_source, vs_code_inactive_template, glsl_version, max_varying); + (void)!asprintf(&fs_source, fs_code_inactive_template, glsl_version, max_varying); pass &= piglit_check_gl_error(0); diff --git a/tests/spec/arb_separate_shader_objects/rendezvous_by_name_interpolation.c b/tests/spec/arb_separate_shader_objects/rendezvous_by_name_interpolation.c index 74d22e28e..b2fe9fe3c 100644 --- a/tests/spec/arb_separate_shader_objects/rendezvous_by_name_interpolation.c +++ b/tests/spec/arb_separate_shader_objects/rendezvous_by_name_interpolation.c @@ -137,7 +137,7 @@ GLuint format_and_link_program_with_qualifiers(GLenum type, const char* code, char *source; GLuint prog; - asprintf(&source, code, glsl_version, qualifiers[q1], qualifiers[q2], qualifiers[q3]); + (void)!asprintf(&source, code, glsl_version, qualifiers[q1], qualifiers[q2], qualifiers[q3]); prog = glCreateShaderProgramv(type, 1, (const GLchar *const *) &source); diff --git a/tests/spec/arb_separate_shader_objects/sso-common.c b/tests/spec/arb_separate_shader_objects/sso-common.c index b35416a7e..64907261a 100644 --- a/tests/spec/arb_separate_shader_objects/sso-common.c +++ b/tests/spec/arb_separate_shader_objects/sso-common.c @@ -61,7 +61,7 @@ format_and_link_program(GLenum type, const char* code, unsigned glsl_version) char *source; GLuint prog; - asprintf(&source, code, glsl_version); + (void)!asprintf(&source, code, glsl_version); prog = glCreateShaderProgramv(type, 1, (const GLchar *const *) &source); diff --git a/tests/spec/arb_separate_shader_objects/uniform-namespace.c b/tests/spec/arb_separate_shader_objects/uniform-namespace.c index 7b210309f..2c8cd988d 100644 --- a/tests/spec/arb_separate_shader_objects/uniform-namespace.c +++ b/tests/spec/arb_separate_shader_objects/uniform-namespace.c @@ -91,7 +91,7 @@ generate_program(const char *code_template, unsigned glsl_version, char *code = NULL; GLuint prog; - asprintf(&code, code_template, glsl_version); + (void)!asprintf(&code, code_template, glsl_version); prog = glCreateShaderProgramv(program_target, 1, (const GLchar * const*) &code); free(code); diff --git a/tests/spec/arb_separate_shader_objects/xfb-rendezvous_by_location.c b/tests/spec/arb_separate_shader_objects/xfb-rendezvous_by_location.c index 5b2f6b0e8..6d4205c71 100644 --- a/tests/spec/arb_separate_shader_objects/xfb-rendezvous_by_location.c +++ b/tests/spec/arb_separate_shader_objects/xfb-rendezvous_by_location.c @@ -94,7 +94,7 @@ void piglit_init(int argc, char **argv) /* The vertex shader must be created using the "traditional" method * because we the call glTransformFeedbackVaryings before linking. */ - asprintf(&source, vs_template, glsl_version); + (void)!asprintf(&source, vs_template, glsl_version); if (!CreateShaderProgram_with_xfb(source, varyings, ARRAY_SIZE(varyings), &vs_prog)) { diff --git a/tests/spec/arb_shader_draw_parameters/basevertex.c b/tests/spec/arb_shader_draw_parameters/basevertex.c index 343c38c2b..1b2181eca 100644 --- a/tests/spec/arb_shader_draw_parameters/basevertex.c +++ b/tests/spec/arb_shader_draw_parameters/basevertex.c @@ -73,16 +73,16 @@ piglit_init(int argc, char **argv) char *vs_text; if (strcmp(argv[1], "basevertex") == 0) { - asprintf(&vs_text, vs_template, + (void)!asprintf(&vs_text, vs_template, "ref.x == gl_BaseVertexARB"); } else if (strcmp(argv[1], "baseinstance") == 0) { - asprintf(&vs_text, vs_template, + (void)!asprintf(&vs_text, vs_template, "ref.y == gl_BaseInstanceARB"); } else if (strcmp(argv[1], "basevertex-baseinstance") == 0) { - asprintf(&vs_text, vs_template, + (void)!asprintf(&vs_text, vs_template, "ref.xy == ivec2(gl_BaseVertexARB, gl_BaseInstanceARB)"); } else if (strcmp(argv[1], "vertexid-zerobased") == 0) { - asprintf(&vs_text, vs_template, + (void)!asprintf(&vs_text, vs_template, "ref.z == gl_VertexID - gl_BaseVertexARB"); } else { printf("Unknown subtest: %s\n", argv[1]); diff --git a/tests/spec/arb_shader_draw_parameters/drawid-indirect.c b/tests/spec/arb_shader_draw_parameters/drawid-indirect.c index a219d14e2..0b5817666 100644 --- a/tests/spec/arb_shader_draw_parameters/drawid-indirect.c +++ b/tests/spec/arb_shader_draw_parameters/drawid-indirect.c @@ -83,16 +83,16 @@ piglit_init(int argc, char **argv) char *vs_text; if (strcmp(argv[1], "drawid") == 0) { - asprintf(&vs_text, vs_template, + (void)!asprintf(&vs_text, vs_template, "ref.x == gl_DrawIDARB"); } else if (strcmp(argv[1], "basevertex") == 0) { - asprintf(&vs_text, vs_template, + (void)!asprintf(&vs_text, vs_template, "ref.xy == ivec2(gl_DrawIDARB, gl_BaseVertexARB)"); } else if (strcmp(argv[1], "baseinstance") == 0) { - asprintf(&vs_text, vs_template, + (void)!asprintf(&vs_text, vs_template, "ref.xz == ivec2(gl_DrawIDARB, gl_BaseInstanceARB)"); } else if (strcmp(argv[1], "vertexid") == 0) { - asprintf(&vs_text, vs_template, + (void)!asprintf(&vs_text, vs_template, "ref.w == gl_VertexID"); } else { printf("Unknown subtest: %s\n", argv[1]); diff --git a/tests/spec/arb_shader_draw_parameters/drawid.c b/tests/spec/arb_shader_draw_parameters/drawid.c index 8e7999868..fa8d797e9 100644 --- a/tests/spec/arb_shader_draw_parameters/drawid.c +++ b/tests/spec/arb_shader_draw_parameters/drawid.c @@ -71,10 +71,10 @@ piglit_init(int argc, char **argv) char *vs_text; if (strcmp(argv[1], "drawid") == 0) { - asprintf(&vs_text, vs_template, + (void)!asprintf(&vs_text, vs_template, "ref.x == gl_DrawIDARB"); } else if (strcmp(argv[1], "vertexid") == 0) { - asprintf(&vs_text, vs_template, + (void)!asprintf(&vs_text, vs_template, "ref.x == gl_DrawIDARB && ref.y == gl_VertexID"); } else { printf("Unknown subtest: %s\n", argv[1]); diff --git a/tests/spec/arb_shader_image_load_store/coherency.c b/tests/spec/arb_shader_image_load_store/coherency.c index 365e3ecf9..d1ecbe8b4 100644 --- a/tests/spec/arb_shader_image_load_store/coherency.c +++ b/tests/spec/arb_shader_image_load_store/coherency.c @@ -99,7 +99,7 @@ qualifier_hunk(const struct image_qualifier_info *qual) { char *s = NULL; - asprintf(&s, "#define IMAGE_Q %s\n", qual->qualifier); + (void)!asprintf(&s, "#define IMAGE_Q %s\n", qual->qualifier); return s; } diff --git a/tests/spec/arb_shader_image_load_store/grid.c b/tests/spec/arb_shader_image_load_store/grid.c index 4b24c2c55..68d80b102 100644 --- a/tests/spec/arb_shader_image_load_store/grid.c +++ b/tests/spec/arb_shader_image_load_store/grid.c @@ -40,7 +40,7 @@ concat(char *hunk0, ...) while ((hunk = va_arg(ap, char *))) { char *t = s; - asprintf(&s, "%s\n%s", t, hunk); + (void)!asprintf(&s, "%s\n%s", t, hunk); free(t); free(hunk); } @@ -54,7 +54,7 @@ image_hunk(const struct image_info img, const char *prefix) { char *s = NULL; - asprintf(&s, + (void)!asprintf(&s, "#define %sBASE_T %s\n" "#define %sDATA_T %s\n" "#define %sSCALE vec4(%.8e, %.8e, %.8e, %.8e)\n" @@ -92,7 +92,7 @@ header_hunk(const struct grid_info grid) { char *s = NULL; - asprintf(&s, "#version 150\n" + (void)!asprintf(&s, "#version 150\n" "#extension GL_ARB_shader_image_load_store : enable\n" "#define W %d\n" "#define H %d\n" diff --git a/tests/spec/arb_shader_image_load_store/indexing.c b/tests/spec/arb_shader_image_load_store/indexing.c index 5ce29a080..bf4a56976 100644 --- a/tests/spec/arb_shader_image_load_store/indexing.c +++ b/tests/spec/arb_shader_image_load_store/indexing.c @@ -73,7 +73,7 @@ init_images(const struct image_info img, GLuint prog) if (!upload_image(img, unit, pixels[0])) return false; - asprintf(&name, "imgs[%d]", unit); + (void)!asprintf(&name, "imgs[%d]", unit); set_uniform_int(prog, name, unit); free(name); } diff --git a/tests/spec/arb_shader_image_load_store/max-images.c b/tests/spec/arb_shader_image_load_store/max-images.c index d06e5c450..abde51c8e 100644 --- a/tests/spec/arb_shader_image_load_store/max-images.c +++ b/tests/spec/arb_shader_image_load_store/max-images.c @@ -119,7 +119,7 @@ bind_images(const struct grid_info grid, GLuint prog) for (i = 0; i < n; ++i) { char *name = NULL; - asprintf(&name, "imgs_%d[%d]", stage_idx, i); + (void)!asprintf(&name, "imgs_%d[%d]", stage_idx, i); if (!set_uniform_int(prog, name, (first + i) % m)) @@ -139,7 +139,7 @@ stage_hunk(const struct grid_info grid, { char *s = NULL; - asprintf(&s, "#define IMGS imgs_%d\n" + (void)!asprintf(&s, "#define IMGS imgs_%d\n" "#define NUM_IMGS %d\n", (int)(stage - image_stages()), num_images_for_stage(grid, stage)); diff --git a/tests/spec/arb_shader_image_load_store/qualifiers.c b/tests/spec/arb_shader_image_load_store/qualifiers.c index bb6f908ae..3832531f9 100644 --- a/tests/spec/arb_shader_image_load_store/qualifiers.c +++ b/tests/spec/arb_shader_image_load_store/qualifiers.c @@ -97,7 +97,7 @@ test_hunk(bool strict_layout_qualifiers, { char *s = NULL; - asprintf(&s, "#define SRC_IMAGE_Q IMAGE_LAYOUT_Q %s\n" + (void)!asprintf(&s, "#define SRC_IMAGE_Q IMAGE_LAYOUT_Q %s\n" "#define DST_IMAGE_Q %s %s\n", (strict_access_qualifiers ? "readonly" : ""), (strict_layout_qualifiers || !strict_access_qualifiers ? diff --git a/tests/spec/arb_shader_image_load_store/restrict.c b/tests/spec/arb_shader_image_load_store/restrict.c index 97981c16d..acd204f1c 100644 --- a/tests/spec/arb_shader_image_load_store/restrict.c +++ b/tests/spec/arb_shader_image_load_store/restrict.c @@ -81,7 +81,7 @@ qualifier_hunk(const struct image_qualifier_info *qual) { char *s = NULL; - asprintf(&s, "#define IMAGE_Q %s\n", qual->qualifier); + (void)!asprintf(&s, "#define IMAGE_Q %s\n", qual->qualifier); return s; } diff --git a/tests/spec/arb_shader_image_load_store/shader-mem-barrier.c b/tests/spec/arb_shader_image_load_store/shader-mem-barrier.c index ddf5da61f..ed086403b 100644 --- a/tests/spec/arb_shader_image_load_store/shader-mem-barrier.c +++ b/tests/spec/arb_shader_image_load_store/shader-mem-barrier.c @@ -93,7 +93,7 @@ test_hunk(const struct image_test_info *test, unsigned k) { char *s = NULL; - asprintf(&s, "#define IMAGE_Q %s\n" + (void)!asprintf(&s, "#define IMAGE_Q %s\n" "#define MEMORY_BARRIER() %s\n" "#define K %d\n", test->qualifier, test->barrier, k); diff --git a/tests/spec/arb_shader_storage_buffer_object/max-ssbo-size.c b/tests/spec/arb_shader_storage_buffer_object/max-ssbo-size.c index 154e1af03..da5d1527a 100644 --- a/tests/spec/arb_shader_storage_buffer_object/max-ssbo-size.c +++ b/tests/spec/arb_shader_storage_buffer_object/max-ssbo-size.c @@ -157,13 +157,13 @@ piglit_display(void) switch (target) { case GL_VERTEX_SHADER: - asprintf(&vs_source, vs_ssbo_template, vec4s); - asprintf(&fs_source, "%s", fs_template); + (void)!asprintf(&vs_source, vs_ssbo_template, vec4s); + (void)!asprintf(&fs_source, "%s", fs_template); printf("Testing VS with shader storage block vec4 v[%d]\n", vec4s); break; case GL_FRAGMENT_SHADER: - asprintf(&vs_source, "%s", vs_template); - asprintf(&fs_source, fs_ssbo_template, vec4s); + (void)!asprintf(&vs_source, "%s", vs_template); + (void)!asprintf(&fs_source, fs_ssbo_template, vec4s); printf("Testing FS with shader storage block vec4 v[%d]\n", vec4s); break; default: diff --git a/tests/spec/arb_shader_storage_buffer_object/maxblocks.c b/tests/spec/arb_shader_storage_buffer_object/maxblocks.c index b03f653f6..50f2f7cb8 100644 --- a/tests/spec/arb_shader_storage_buffer_object/maxblocks.c +++ b/tests/spec/arb_shader_storage_buffer_object/maxblocks.c @@ -112,10 +112,10 @@ get_shader(GLenum target, const char *block_prefix, int blocks) switch (target) { case GL_VERTEX_SHADER: - asprintf(&shader, vs_source, prefix, body); + (void)!asprintf(&shader, vs_source, prefix, body); break; case GL_FRAGMENT_SHADER: - asprintf(&shader, fs_source, prefix, body); + (void)!asprintf(&shader, fs_source, prefix, body); break; default: piglit_report_result(PIGLIT_FAIL); diff --git a/tests/spec/arb_texture_buffer_object/formats.c b/tests/spec/arb_texture_buffer_object/formats.c index 86f27f8c0..fad657d40 100644 --- a/tests/spec/arb_texture_buffer_object/formats.c +++ b/tests/spec/arb_texture_buffer_object/formats.c @@ -646,12 +646,12 @@ create_program(struct program *program, const char *type) threshold = "ivec4(1)"; if (test_vs) { - asprintf(&vs_source, vs_vert_source, type, type, type, type, + (void)!asprintf(&vs_source, vs_vert_source, type, type, type, type, threshold); fs_source = fs_vert_source; } else { vs_source = vs_frag_source; - asprintf(&fs_source, fs_frag_source, type, type, type, type, + (void)!asprintf(&fs_source, fs_frag_source, type, type, type, type, threshold); } diff --git a/tests/spec/arb_texture_view/rendering_layers.c b/tests/spec/arb_texture_view/rendering_layers.c index 4a7f3c22c..a461b08ef 100644 --- a/tests/spec/arb_texture_view/rendering_layers.c +++ b/tests/spec/arb_texture_view/rendering_layers.c @@ -159,13 +159,13 @@ piglit_init(int argc, char **argv) piglit_require_extension("GL_EXT_texture_array"); /* setup shaders and program object for 2DArray rendering */ - asprintf(&vsCode, + (void)!asprintf(&vsCode, "void main()\n" "{\n" " gl_Position = gl_Vertex;\n" " gl_TexCoord[0] = gl_MultiTexCoord0;\n" "}\n"); - asprintf(&fsCode, + (void)!asprintf(&fsCode, "#extension GL_EXT_texture_array : enable\n" "uniform sampler2DArray tex;\n" "void main()\n" diff --git a/tests/spec/arb_texture_view/rendering_target.c b/tests/spec/arb_texture_view/rendering_target.c index 1ef5cc771..554d1d749 100644 --- a/tests/spec/arb_texture_view/rendering_target.c +++ b/tests/spec/arb_texture_view/rendering_target.c @@ -232,13 +232,13 @@ piglit_init(int argc, char **argv) piglit_require_extension("GL_EXT_texture_array"); /* setup shaders and program object for 2DArray rendering */ - asprintf(&vsCode, + (void)!asprintf(&vsCode, "void main()\n" "{\n" " gl_Position = gl_Vertex;\n" " gl_TexCoord[0] = gl_MultiTexCoord0;\n" "}\n"); - asprintf(&fsCode, + (void)!asprintf(&fsCode, "#extension GL_EXT_texture_array : enable\n" "uniform sampler2DArray tex;\n" "void main()\n" @@ -252,7 +252,7 @@ piglit_init(int argc, char **argv) tex_loc_2Darray = glGetUniformLocation(prog2Darray, "tex"); /* setup shaders and program object for 1D rendering */ - asprintf(&fsCode, + (void)!asprintf(&fsCode, "#extension GL_EXT_texture_array : enable\n" "uniform sampler1D tex;\n" "void main()\n" diff --git a/tests/spec/arb_texture_view/sampling-2d-array-as-cubemap-array.c b/tests/spec/arb_texture_view/sampling-2d-array-as-cubemap-array.c index 241565230..52d632885 100644 --- a/tests/spec/arb_texture_view/sampling-2d-array-as-cubemap-array.c +++ b/tests/spec/arb_texture_view/sampling-2d-array-as-cubemap-array.c @@ -71,12 +71,12 @@ piglit_init(int argc, char **argv) piglit_require_extension("GL_ARB_texture_cube_map_array"); /* setup shaders and program object for Cube rendering */ - asprintf(&vsCode, + (void)!asprintf(&vsCode, "void main()\n" "{\n" " gl_Position = gl_Vertex;\n" "}\n"); - asprintf(&fsCode, + (void)!asprintf(&fsCode, "#extension GL_ARB_texture_cube_map_array: require\n" "uniform samplerCubeArray tex;\n" "void main()\n" diff --git a/tests/spec/arb_texture_view/sampling-2d-array-as-cubemap.c b/tests/spec/arb_texture_view/sampling-2d-array-as-cubemap.c index 987c79775..eaee0a00e 100644 --- a/tests/spec/arb_texture_view/sampling-2d-array-as-cubemap.c +++ b/tests/spec/arb_texture_view/sampling-2d-array-as-cubemap.c @@ -70,12 +70,12 @@ piglit_init(int argc, char **argv) piglit_require_extension("GL_ARB_texture_view"); /* setup shaders and program object for Cube rendering */ - asprintf(&vsCode, + (void)!asprintf(&vsCode, "void main()\n" "{\n" " gl_Position = gl_Vertex;\n" "}\n"); - asprintf(&fsCode, + (void)!asprintf(&fsCode, "uniform samplerCube tex;\n" "void main()\n" "{\n" diff --git a/tests/spec/arb_transform_feedback3/ext_interleaved_two_bufs.c b/tests/spec/arb_transform_feedback3/ext_interleaved_two_bufs.c index 06937eb50..89c11bc79 100644 --- a/tests/spec/arb_transform_feedback3/ext_interleaved_two_bufs.c +++ b/tests/spec/arb_transform_feedback3/ext_interleaved_two_bufs.c @@ -129,7 +129,7 @@ build_and_use_program(unsigned gs_invocation_n) } else { char *gs_text; - asprintf(&gs_text, gs_text_two_sets_tmpl, gs_invocation_n); + (void)!asprintf(&gs_text, gs_text_two_sets_tmpl, gs_invocation_n); prog = piglit_build_simple_program_multiple_shaders( GL_VERTEX_SHADER, vs_pass_thru_text, GL_GEOMETRY_SHADER, gs_text, 0); diff --git a/tests/spec/arb_transform_feedback3/set_invalid_varyings.c b/tests/spec/arb_transform_feedback3/set_invalid_varyings.c index 2a7fc594a..aa3e55bc9 100644 --- a/tests/spec/arb_transform_feedback3/set_invalid_varyings.c +++ b/tests/spec/arb_transform_feedback3/set_invalid_varyings.c @@ -129,7 +129,7 @@ try_max_separators(GLuint prog, unsigned n) vars = (const char **)malloc(var_n * sizeof(const char *)); for (i = 0; i <= n; ++i) { - asprintf((char **)&vars[2 * i + 0], "x_0x%08x", i); + (void)!asprintf((char **)&vars[2 * i + 0], "x_0x%08x", i); if (i < n) { static const char separator[] = "gl_NextBuffer"; diff --git a/tests/spec/arb_uniform_buffer_object/getactiveuniformblockiv-uniform-block-data-size.c b/tests/spec/arb_uniform_buffer_object/getactiveuniformblockiv-uniform-block-data-size.c index 97edc400c..a728040d9 100644 --- a/tests/spec/arb_uniform_buffer_object/getactiveuniformblockiv-uniform-block-data-size.c +++ b/tests/spec/arb_uniform_buffer_object/getactiveuniformblockiv-uniform-block-data-size.c @@ -76,7 +76,7 @@ test_format(const struct uniform_type *type, bool row_major) else transposed_type = type; - asprintf(&fs_source, fs_template, + (void)!asprintf(&fs_source, fs_template, row_major ? "layout(row_major) " : "", type->type); prog = piglit_build_simple_program(NULL, fs_source); diff --git a/tests/spec/arb_uniform_buffer_object/getactiveuniformsiv-uniform-type.c b/tests/spec/arb_uniform_buffer_object/getactiveuniformsiv-uniform-type.c index fc54036e6..9034446c3 100644 --- a/tests/spec/arb_uniform_buffer_object/getactiveuniformsiv-uniform-type.c +++ b/tests/spec/arb_uniform_buffer_object/getactiveuniformsiv-uniform-type.c @@ -67,7 +67,7 @@ test_format(const struct uniform_type *type) deref = "u[0].x"; } - asprintf(&fs_source, fs_template, type->type, deref); + (void)!asprintf(&fs_source, fs_template, type->type, deref); prog = piglit_build_simple_program(NULL, fs_source); free(fs_source); diff --git a/tests/spec/arb_uniform_buffer_object/layout-std140-base-size-and-alignment.c b/tests/spec/arb_uniform_buffer_object/layout-std140-base-size-and-alignment.c index ffef8d13e..8fdd624b3 100644 --- a/tests/spec/arb_uniform_buffer_object/layout-std140-base-size-and-alignment.c +++ b/tests/spec/arb_uniform_buffer_object/layout-std140-base-size-and-alignment.c @@ -82,7 +82,7 @@ test_format(const struct uniform_type *type, bool row_major) else deref = "u[0].x"; - asprintf(&fs_source, fs_template, + (void)!asprintf(&fs_source, fs_template, row_major && type->size > 16 ? "layout(row_major) " : "", type->type, deref); diff --git a/tests/spec/arb_uniform_buffer_object/link-mismatch-blocks.c b/tests/spec/arb_uniform_buffer_object/link-mismatch-blocks.c index 20fc8e332..0b03fb958 100644 --- a/tests/spec/arb_uniform_buffer_object/link-mismatch-blocks.c +++ b/tests/spec/arb_uniform_buffer_object/link-mismatch-blocks.c @@ -199,7 +199,7 @@ get_shader(GLenum target, const char *header, const char *body) break; } - asprintf(&source, template, header, body); + (void)!asprintf(&source, template, header, body); return source; } diff --git a/tests/spec/arb_uniform_buffer_object/maxblocks.c b/tests/spec/arb_uniform_buffer_object/maxblocks.c index c520e7442..abe07cfed 100644 --- a/tests/spec/arb_uniform_buffer_object/maxblocks.c +++ b/tests/spec/arb_uniform_buffer_object/maxblocks.c @@ -108,10 +108,10 @@ get_shader(GLenum target, const char *block_prefix, int blocks) switch (target) { case GL_VERTEX_SHADER: - asprintf(&shader, vs_source, prefix, body); + (void)!asprintf(&shader, vs_source, prefix, body); break; case GL_FRAGMENT_SHADER: - asprintf(&shader, fs_source, prefix, body); + (void)!asprintf(&shader, fs_source, prefix, body); break; default: piglit_report_result(PIGLIT_FAIL); diff --git a/tests/spec/arb_uniform_buffer_object/maxuniformblocksize.c b/tests/spec/arb_uniform_buffer_object/maxuniformblocksize.c index c9cff493f..ea2d7cd77 100644 --- a/tests/spec/arb_uniform_buffer_object/maxuniformblocksize.c +++ b/tests/spec/arb_uniform_buffer_object/maxuniformblocksize.c @@ -151,13 +151,13 @@ piglit_display(void) switch (target) { case GL_VERTEX_SHADER: - asprintf(&vs_source, vs_ubo_template, vec4s); - asprintf(&fs_source, "%s", fs_template); + (void)!asprintf(&vs_source, vs_ubo_template, vec4s); + (void)!asprintf(&fs_source, "%s", fs_template); printf("Testing VS with uniform block vec4 v[%d]\n", vec4s); break; case GL_FRAGMENT_SHADER: - asprintf(&vs_source, "%s", vs_template); - asprintf(&fs_source, fs_ubo_template, vec4s); + (void)!asprintf(&vs_source, "%s", vs_template); + (void)!asprintf(&fs_source, fs_ubo_template, vec4s); printf("Testing FS with uniform block vec4 v[%d]\n", vec4s); break; default: diff --git a/tests/spec/arb_uniform_buffer_object/referenced-by-shader.c b/tests/spec/arb_uniform_buffer_object/referenced-by-shader.c index 4918c842f..6f5cf6eaa 100644 --- a/tests/spec/arb_uniform_buffer_object/referenced-by-shader.c +++ b/tests/spec/arb_uniform_buffer_object/referenced-by-shader.c @@ -100,19 +100,19 @@ piglit_init(int argc, char **argv) prog = glCreateProgram(); - asprintf(&temp_source, vs_source, header); + (void)!asprintf(&temp_source, vs_source, header); vs = piglit_compile_shader_text(GL_VERTEX_SHADER, temp_source); glAttachShader(prog, vs); free(temp_source); if (use_gs) { - asprintf(&temp_source, gs_source, header); + (void)!asprintf(&temp_source, gs_source, header); gs = piglit_compile_shader_text(GL_GEOMETRY_SHADER, temp_source); glAttachShader(prog, gs); free(temp_source); } - asprintf(&temp_source, fs_source, header); + (void)!asprintf(&temp_source, fs_source, header); fs = piglit_compile_shader_text(GL_FRAGMENT_SHADER, temp_source); glAttachShader(prog, fs); free(temp_source); diff --git a/tests/spec/arb_viewport_array/render_scissor.c b/tests/spec/arb_viewport_array/render_scissor.c index 02de7ced0..255506812 100644 --- a/tests/spec/arb_viewport_array/render_scissor.c +++ b/tests/spec/arb_viewport_array/render_scissor.c @@ -206,14 +206,14 @@ piglit_init(int argc, char **argv) piglit_require_extension("GL_ARB_viewport_array"); - asprintf(&vsSource, + (void)!asprintf(&vsSource, "#version 150\n" "in vec4 piglit_vertex;\n" "void main() {\n" " gl_Position = piglit_vertex;\n" "}\n"); - asprintf(&gsSource, + (void)!asprintf(&gsSource, "#version 150\n" "#extension GL_ARB_viewport_array : enable\n" "layout(triangles) in;\n" @@ -233,7 +233,7 @@ piglit_init(int argc, char **argv) " }\n" "}\n", divX * divY); - asprintf(&fsSource, + (void)!asprintf(&fsSource, "#version 150\n" "in vec3 color;\n" "void main() {\n" diff --git a/tests/spec/ext_framebuffer_multisample/fast-clear.c b/tests/spec/ext_framebuffer_multisample/fast-clear.c index d6d5f58ea..c2e3e8620 100644 --- a/tests/spec/ext_framebuffer_multisample/fast-clear.c +++ b/tests/spec/ext_framebuffer_multisample/fast-clear.c @@ -517,7 +517,7 @@ build_program(const char *fragment_source) GLuint prog; char *source; - asprintf(&source, + (void)!asprintf(&source, fragment_source, single_sample ? "" : diff --git a/tests/spec/ext_framebuffer_multisample_blit_scaled/blit-scaled.cpp b/tests/spec/ext_framebuffer_multisample_blit_scaled/blit-scaled.cpp index 576ff64c5..a192655e3 100644 --- a/tests/spec/ext_framebuffer_multisample_blit_scaled/blit-scaled.cpp +++ b/tests/spec/ext_framebuffer_multisample_blit_scaled/blit-scaled.cpp @@ -190,21 +190,21 @@ compile_shader(GLenum target) char const*target_string; if (target == GL_TEXTURE_2D_MULTISAMPLE) { - asprintf(&texel_fetch_macro, + (void)!asprintf(&texel_fetch_macro, "#define TEXEL_FETCH(coord) texelFetch(texSampler, " "ivec2(coord), %s);\n", sample_number); target_string = "sampler2DMS"; } else { /* The layer for the array texture is hardcoded to 1. */ - asprintf(&texel_fetch_macro, + (void)!asprintf(&texel_fetch_macro, "#define TEXEL_FETCH(coord) texelFetch(texSampler, " "ivec3(coord, 1), %s);\n", sample_number); target_string = "sampler2DMSArray"; } - asprintf(&frag, frag_template, target_string, sample_map, + (void)!asprintf(&frag, frag_template, target_string, sample_map, y_scale, 1.0f / y_scale, 1.0f / samples, texel_fetch_macro); diff --git a/tests/spec/ext_transform_feedback/api-errors.c b/tests/spec/ext_transform_feedback/api-errors.c index d620888f6..3f277c9e3 100644 --- a/tests/spec/ext_transform_feedback/api-errors.c +++ b/tests/spec/ext_transform_feedback/api-errors.c @@ -227,9 +227,9 @@ do_test(const struct test_desc *test) piglit_require_extension("GL_ARB_separate_shader_objects"); if (piglit_get_gl_version() >= 32) - asprintf(&vstext_sep, vstext_sep_template, 150); + (void)!asprintf(&vstext_sep, vstext_sep_template, 150); else - asprintf(&vstext_sep, vstext_sep_template, 110); + (void)!asprintf(&vstext_sep, vstext_sep_template, 110); } glGetIntegerv(GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS, diff --git a/tests/spec/ext_transform_feedback/overflow-edge-cases.c b/tests/spec/ext_transform_feedback/overflow-edge-cases.c index a33a1d65d..344d0ffdb 100644 --- a/tests/spec/ext_transform_feedback/overflow-edge-cases.c +++ b/tests/spec/ext_transform_feedback/overflow-edge-cases.c @@ -152,7 +152,7 @@ piglit_init(int argc, char **argv) char *gstext; vs = piglit_compile_shader_text(GL_VERTEX_SHADER, vstext_gs); - asprintf(&gstext, gstext_gs, + (void)!asprintf(&gstext, gstext_gs, mode_gs_out_primtypes[mode]); gs = piglit_compile_shader_text(GL_GEOMETRY_SHADER, gstext); diff --git a/tests/spec/ext_transform_feedback/structs.c b/tests/spec/ext_transform_feedback/structs.c index 3d90bb9fd..4f4e56cc8 100644 --- a/tests/spec/ext_transform_feedback/structs.c +++ b/tests/spec/ext_transform_feedback/structs.c @@ -778,7 +778,7 @@ compile_shader(GLenum target, const char *shader_text) const char *header = choose_header(); char *concatenated_text = NULL; GLuint shader; - asprintf(&concatenated_text, "%s%s", header, shader_text); + (void)!asprintf(&concatenated_text, "%s%s", header, shader_text); shader = piglit_compile_shader_text(target, concatenated_text); free(concatenated_text); return shader; @@ -797,7 +797,7 @@ prepend_varyings(const char *prefix, const char * const *varyings) char **result = calloc(num_varyings + 1, sizeof(char *)); unsigned i; for (i = 0; i < num_varyings; i++) - asprintf(&result[i], "%s%s", prefix, varyings[i]); + (void)!asprintf(&result[i], "%s%s", prefix, varyings[i]); result[num_varyings] = NULL; return (const char **) result; } diff --git a/tests/spec/gl-2.0/vertex-program-two-side.c b/tests/spec/gl-2.0/vertex-program-two-side.c index 786f070e0..de9a2a343 100644 --- a/tests/spec/gl-2.0/vertex-program-two-side.c +++ b/tests/spec/gl-2.0/vertex-program-two-side.c @@ -134,7 +134,7 @@ piglit_display(void) static void setup_output(char **out, const char *name, float *values) { - asprintf(out, + (void)!asprintf(out, " %s = vec4(%f, %f, %f, %f);\n", name, values[0], @@ -186,7 +186,7 @@ piglit_init(int argc, char **argv) if (back2) setup_output(&vs_outputs[3], "gl_BackSecondaryColor", secondary_backcolor); - asprintf(&vs_source, + (void)!asprintf(&vs_source, "void main()\n" "{\n" " gl_Position = gl_Vertex;\n" diff --git a/tests/spec/glsl-1.50/execution/geometry/end-primitive.c b/tests/spec/glsl-1.50/execution/geometry/end-primitive.c index 97d83758f..b54e7c744 100644 --- a/tests/spec/glsl-1.50/execution/geometry/end-primitive.c +++ b/tests/spec/glsl-1.50/execution/geometry/end-primitive.c @@ -250,7 +250,7 @@ piglit_init(int argc, char **argv) vs_test_text); gs_test_main = piglit_compile_shader_text(GL_GEOMETRY_SHADER, gs_test_text); - asprintf(&text, gs_layout_template, num_vertices); + (void)!asprintf(&text, gs_layout_template, num_vertices); gs_layout = piglit_compile_shader_text(GL_GEOMETRY_SHADER, text); free(text); fs_main = piglit_compile_shader_text(GL_FRAGMENT_SHADER, fs_text); diff --git a/tests/spec/glsl-1.50/execution/geometry/gs-input-layout-qualifiers.c b/tests/spec/glsl-1.50/execution/geometry/gs-input-layout-qualifiers.c index a5e5f903a..290f85fae 100644 --- a/tests/spec/glsl-1.50/execution/geometry/gs-input-layout-qualifiers.c +++ b/tests/spec/glsl-1.50/execution/geometry/gs-input-layout-qualifiers.c @@ -98,7 +98,7 @@ piglit_init(int argc, char **argv) } } - asprintf(&gstext, gstemplate, layout); + (void)!asprintf(&gstext, gstemplate, layout); gs = glCreateShader(GL_GEOMETRY_SHADER); glShaderSource(gs, 1, (const GLchar **) &gstext, NULL); glCompileShader(gs); diff --git a/tests/spec/glsl-1.50/execution/geometry/gs-mismatch-prim-type.c b/tests/spec/glsl-1.50/execution/geometry/gs-mismatch-prim-type.c index 09ad6f047..f7aed151d 100644 --- a/tests/spec/glsl-1.50/execution/geometry/gs-mismatch-prim-type.c +++ b/tests/spec/glsl-1.50/execution/geometry/gs-mismatch-prim-type.c @@ -142,7 +142,7 @@ piglit_init(int argc, char **argv) prog = glCreateProgram(); vs = piglit_compile_shader_text(GL_VERTEX_SHADER, vstext); - asprintf(&gstext, gstemplate, layout); + (void)!asprintf(&gstext, gstemplate, layout); gs = piglit_compile_shader_text(GL_GEOMETRY_SHADER, gstext); fs = piglit_compile_shader_text(GL_FRAGMENT_SHADER, fstext); glAttachShader(prog, vs); diff --git a/tests/spec/glsl-1.50/execution/geometry/gs-output-layout-qualifiers.c b/tests/spec/glsl-1.50/execution/geometry/gs-output-layout-qualifiers.c index 4f6d5b199..fc9c0e6bc 100644 --- a/tests/spec/glsl-1.50/execution/geometry/gs-output-layout-qualifiers.c +++ b/tests/spec/glsl-1.50/execution/geometry/gs-output-layout-qualifiers.c @@ -95,7 +95,7 @@ piglit_init(int argc, char **argv) } } - asprintf(&gstext, gstemplate, layout); + (void)!asprintf(&gstext, gstemplate, layout); gs = glCreateShader(GL_GEOMETRY_SHADER); glShaderSource(gs, 1, (const GLchar **) &gstext, NULL); glCompileShader(gs); diff --git a/tests/spec/glsl-1.50/execution/geometry/primitive-id-restart.c b/tests/spec/glsl-1.50/execution/geometry/primitive-id-restart.c index 362b48ca9..790fdb722 100644 --- a/tests/spec/glsl-1.50/execution/geometry/primitive-id-restart.c +++ b/tests/spec/glsl-1.50/execution/geometry/primitive-id-restart.c @@ -185,7 +185,7 @@ piglit_init(int argc, char **argv) prog = glCreateProgram(); vs = piglit_compile_shader_text(GL_VERTEX_SHADER, vs_text); glAttachShader(prog, vs); - asprintf(&gs_text, gs_template, input_layout); + (void)!asprintf(&gs_text, gs_template, input_layout); gs = piglit_compile_shader_text(GL_GEOMETRY_SHADER, gs_text); free(gs_text); glAttachShader(prog, gs); diff --git a/tests/spec/glsl-1.50/execution/geometry/primitive-types.c b/tests/spec/glsl-1.50/execution/geometry/primitive-types.c index a44f7075d..13441d28e 100644 --- a/tests/spec/glsl-1.50/execution/geometry/primitive-types.c +++ b/tests/spec/glsl-1.50/execution/geometry/primitive-types.c @@ -396,7 +396,7 @@ piglit_init(int argc, char **argv) prog = glCreateProgram(); vs = piglit_compile_shader_text(GL_VERTEX_SHADER, vs_text); glAttachShader(prog, vs); - asprintf(&gs_text, gs_template, test->input_layout, + (void)!asprintf(&gs_text, gs_template, test->input_layout, test->vertices_per_prim); gs = piglit_compile_shader_text(GL_GEOMETRY_SHADER, gs_text); free(gs_text); diff --git a/tests/spec/glsl-1.50/execution/geometry/transform-feedback-builtins.c b/tests/spec/glsl-1.50/execution/geometry/transform-feedback-builtins.c index 969bd92f4..6f780929b 100644 --- a/tests/spec/glsl-1.50/execution/geometry/transform-feedback-builtins.c +++ b/tests/spec/glsl-1.50/execution/geometry/transform-feedback-builtins.c @@ -89,12 +89,12 @@ piglit_init(int argc, char **argv) num_xfb_buffers = ARRAY_SIZE(xfb_buf); if (test_gl_ViewportIndex) { - asprintf(&gstext, gs_template, + (void)!asprintf(&gstext, gs_template, "#extension GL_ARB_viewport_array : require\n", " gl_ViewportIndex = i + 1;\n"); } else { printf("Skip testing 'gl_ViewportIndex'\n"); - asprintf(&gstext, gs_template, "", ""); + (void)!asprintf(&gstext, gs_template, "", ""); num_xfb_buffers -= 1; } diff --git a/tests/spec/glsl-1.50/execution/geometry/tri-strip-ordering-with-prim-restart.c b/tests/spec/glsl-1.50/execution/geometry/tri-strip-ordering-with-prim-restart.c index 3229f1a7b..64d78b946 100644 --- a/tests/spec/glsl-1.50/execution/geometry/tri-strip-ordering-with-prim-restart.c +++ b/tests/spec/glsl-1.50/execution/geometry/tri-strip-ordering-with-prim-restart.c @@ -206,7 +206,7 @@ piglit_init(int argc, char **argv) prog = glCreateProgram(); vs = piglit_compile_shader_text(GL_VERTEX_SHADER, vs_text); glAttachShader(prog, vs); - asprintf(&gs_text, gs_template, test->input_layout, + (void)!asprintf(&gs_text, gs_template, test->input_layout, test->vertices_per_prim); gs = piglit_compile_shader_text(GL_GEOMETRY_SHADER, gs_text); free(gs_text); diff --git a/tests/texturing/shaders/texelFetch.c b/tests/texturing/shaders/texelFetch.c index 66ee6e8fd..0291a123e 100644 --- a/tests/texturing/shaders/texelFetch.c +++ b/tests/texturing/shaders/texelFetch.c @@ -352,7 +352,7 @@ upload_multisample_data(GLuint tex, int width, int height, "void main() {\n" " gl_Position = pos;\n" "}\n"); - asprintf(&fs_code, + (void)!asprintf(&fs_code, "#version 130\n" "#extension GL_ARB_explicit_attrib_location: require\n" "#extension GL_ARB_fragment_coord_conventions: require\n" @@ -602,7 +602,7 @@ generate_GLSL(enum shader_target test_stage) switch (test_stage) { case VS: - asprintf(&vs_code, + (void)!asprintf(&vs_code, "#version %d\n" "%s\n" "#define ivec1 int\n" @@ -623,7 +623,7 @@ generate_GLSL(enum shader_target test_stage) ((sampler.target == GL_TEXTURE_RECTANGLE) ? "" : ", texcoord.w"), offset_arg); - asprintf(&fs_code, + (void)!asprintf(&fs_code, "#version %d\n" "flat in %s color;\n" "uniform vec4 divisor;\n" @@ -635,7 +635,7 @@ generate_GLSL(enum shader_target test_stage) sampler.return_type); break; case GS: - asprintf(&vs_code, + (void)!asprintf(&vs_code, "#version %d\n" "in vec4 pos;\n" "in ivec4 texcoord;\n" @@ -647,7 +647,7 @@ generate_GLSL(enum shader_target test_stage) " pos_to_gs = pos;\n" "}\n", shader_version); - asprintf(&gs_code, + (void)!asprintf(&gs_code, "#version %d\n" "%s\n" "#define ivec1 int\n" @@ -672,7 +672,7 @@ generate_GLSL(enum shader_target test_stage) ((sampler.target == GL_TEXTURE_RECTANGLE) ? "" : ", texcoord.w"), offset_arg); - asprintf(&fs_code, + (void)!asprintf(&fs_code, "#version %d\n" "flat in %s color;\n" "uniform vec4 divisor;\n" @@ -684,7 +684,7 @@ generate_GLSL(enum shader_target test_stage) sampler.return_type); break; case FS: - asprintf(&vs_code, + (void)!asprintf(&vs_code, "#version %d\n" "#define ivec1 int\n" "in vec4 pos;\n" @@ -696,7 +696,7 @@ generate_GLSL(enum shader_target test_stage) " gl_Position = pos;\n" "}\n", shader_version); - asprintf(&fs_code, + (void)!asprintf(&fs_code, "#version %d\n" "%s\n" "#define ivec1 int\n" diff --git a/tests/texturing/shaders/textureGather.c b/tests/texturing/shaders/textureGather.c index 4e439ce3e..226ddeb49 100644 --- a/tests/texturing/shaders/textureGather.c +++ b/tests/texturing/shaders/textureGather.c @@ -418,13 +418,13 @@ do_shader_setup(void) bool need_shader5 = (comp_select != -1) || use_offsets || use_nonconst || (comptype == SHADOW_T) || sampler == SAMPLER_2DRECT; if (use_offsets) - asprintf(&offset_coords, "const ivec2 osets[4] = ivec2[4](ivec2(%d, %d), ivec2(%d, %d), ivec2(3, 3), ivec2(-3, -3));\n", + (void)!asprintf(&offset_coords, "const ivec2 osets[4] = ivec2[4](ivec2(%d, %d), ivec2(%d, %d), ivec2(3, 3), ivec2(-3, -3));\n", min_offset, max_offset, max_offset, min_offset); else if (use_offset) - asprintf(&offset_coords, ", ivec2(%d,%d)", min_offset, max_offset); + (void)!asprintf(&offset_coords, ", ivec2(%d,%d)", min_offset, max_offset); if (stage == VS) { - asprintf(&vs_code, "#version %s\n" + (void)!asprintf(&vs_code, "#version %s\n" "#extension GL_ARB_explicit_attrib_location: require\n" "#extension GL_ARB_texture_gather: require\n" "%s" @@ -452,7 +452,7 @@ do_shader_setup(void) comptype == SHADOW_T ? ", 0.5" : "", use_offsets ? ", osets" : use_nonconst ? ", o1+o2" : use_offset ? offset_coords : "", comp_expr[1 + comp_select]); - asprintf(&fs_code, + (void)!asprintf(&fs_code, "#version %s\n" "\n" "in vec4 c;\n" @@ -463,7 +463,7 @@ do_shader_setup(void) need_shader5 ? "150" : "130"); } else { - asprintf(&vs_code, + (void)!asprintf(&vs_code, "#version %s\n" "#extension GL_ARB_explicit_attrib_location: require\n" "layout(location=0) in vec4 pos;\n" @@ -472,7 +472,7 @@ do_shader_setup(void) " gl_Position = pos;\n" "}\n", need_shader5 ? "150" : "130"); - asprintf(&fs_code, + (void)!asprintf(&fs_code, "#version %s\n" "#extension GL_ARB_texture_gather: require\n" "%s" diff --git a/tests/texturing/shaders/textureSamples.c b/tests/texturing/shaders/textureSamples.c index 11b3b88bd..497eabd2a 100644 --- a/tests/texturing/shaders/textureSamples.c +++ b/tests/texturing/shaders/textureSamples.c @@ -124,7 +124,7 @@ generate_GLSL(enum shader_target test_stage) switch (test_stage) { case VS: - asprintf(&vs_code, + (void)!asprintf(&vs_code, "#version %d\n" "#extension GL_ARB_texture_multisample: enable\n" "#extension GL_ARB_shader_texture_image_samples: enable\n" @@ -139,7 +139,7 @@ generate_GLSL(enum shader_target test_stage) shader_version, sampler.name); break; case GS: - asprintf(&vs_code, + (void)!asprintf(&vs_code, "#version %d\n" "in vec4 piglit_vertex;\n" "out vec4 pos_to_gs;\n" @@ -148,7 +148,7 @@ generate_GLSL(enum shader_target test_stage) " pos_to_gs = piglit_vertex;\n" "}\n", shader_version); - asprintf(&gs_code, + (void)!asprintf(&gs_code, "#version %d\n" "#extension GL_ARB_texture_multisample: enable\n" "#extension GL_ARB_shader_texture_image_samples: enable\n" @@ -168,7 +168,7 @@ generate_GLSL(enum shader_target test_stage) shader_version, sampler.name); break; case FS: - asprintf(&vs_code, + (void)!asprintf(&vs_code, "#version %d\n" "in vec4 piglit_vertex;\n" "void main()\n" @@ -176,7 +176,7 @@ generate_GLSL(enum shader_target test_stage) " gl_Position = piglit_vertex;\n" "}\n", shader_version); - asprintf(&fs_code, + (void)!asprintf(&fs_code, "#version %d\n" "#extension GL_ARB_texture_multisample: enable\n" "#extension GL_ARB_shader_texture_image_samples: enable\n" @@ -197,7 +197,7 @@ generate_GLSL(enum shader_target test_stage) switch (test_stage) { case VS: case GS: - asprintf(&fs_code, + (void)!asprintf(&fs_code, "#version %d\n" "flat in int samples;\n" "out vec4 color;\n" diff --git a/tests/texturing/shaders/textureSize.c b/tests/texturing/shaders/textureSize.c index 4013b498d..c02c566cd 100644 --- a/tests/texturing/shaders/textureSize.c +++ b/tests/texturing/shaders/textureSize.c @@ -266,7 +266,7 @@ generate_GLSL(enum shader_target test_stage) switch (test_stage) { case VS: - asprintf(&vs_code, + (void)!asprintf(&vs_code, "#version %d\n%s" "#define ivec1 int\n" "uniform int lod;\n" @@ -279,7 +279,7 @@ generate_GLSL(enum shader_target test_stage) " gl_Position = vertex;\n" "}\n", shader_version, extension, sampler.name, size, lod_arg); - asprintf(&fs_code, + (void)!asprintf(&fs_code, "#version %d\n" "#define ivec1 int\n" "#define vec1 float\n" @@ -291,7 +291,7 @@ generate_GLSL(enum shader_target test_stage) shader_version, size, zeroes[3 - size]); break; case GS: - asprintf(&vs_code, + (void)!asprintf(&vs_code, "#version %d\n" "in vec4 vertex;\n" "out vec4 pos_to_gs;\n" @@ -300,7 +300,7 @@ generate_GLSL(enum shader_target test_stage) " pos_to_gs = vertex;\n" "}\n", shader_version); - asprintf(&gs_code, + (void)!asprintf(&gs_code, "#version %d\n" "%s\n" "#define ivec1 int\n" @@ -320,7 +320,7 @@ generate_GLSL(enum shader_target test_stage) "}\n", shader_version, extension, sampler.name, size, lod_arg); - asprintf(&fs_code, + (void)!asprintf(&fs_code, "#version %d\n" "#define ivec1 int\n" "#define vec1 float\n" @@ -332,7 +332,7 @@ generate_GLSL(enum shader_target test_stage) shader_version, size, zeroes[3 - size]); break; case FS: - asprintf(&vs_code, + (void)!asprintf(&vs_code, "#version %d\n" "in vec4 vertex;\n" "void main()\n" @@ -340,7 +340,7 @@ generate_GLSL(enum shader_target test_stage) " gl_Position = vertex;\n" "}\n", shader_version); - asprintf(&fs_code, + (void)!asprintf(&fs_code, "#version %d\n%s" "#define ivec1 int\n" "uniform int lod;\n" diff --git a/tests/util/minmax-test.c b/tests/util/minmax-test.c index dc63c682a..55f6201dc 100644 --- a/tests/util/minmax-test.c +++ b/tests/util/minmax-test.c @@ -122,7 +122,7 @@ piglit_test_int_v(GLenum token, GLuint index, GLint limit, bool max) { char *name; GLint val = 9999; - asprintf(&name, "%s[%d]", piglit_get_gl_enum_name(token), index); + (void)!asprintf(&name, "%s[%d]", piglit_get_gl_enum_name(token), index); glGetIntegeri_v(token, index, &val); @@ -288,11 +288,11 @@ void piglit_test_range_float(GLenum token, GLfloat low, GLfloat high) pass = piglit_check_gl_error(GL_NO_ERROR); - asprintf(&temp, "%s[0]", name); + (void)!asprintf(&temp, "%s[0]", name); piglit_report_float(temp, low, vals[0], pass && vals[0] <= low); free(temp); - asprintf(&temp, "%s[1]", name); + (void)!asprintf(&temp, "%s[1]", name); piglit_report_float(temp, high, vals[1], pass && vals[1] >= high); free(temp); } diff --git a/tests/util/piglit-framework-gl.c b/tests/util/piglit-framework-gl.c index 1973dbcef..9748ddf03 100644 --- a/tests/util/piglit-framework-gl.c +++ b/tests/util/piglit-framework-gl.c @@ -245,7 +245,7 @@ piglit_present_results(void) base_format, GL_UNSIGNED_BYTE, image); assert(glGetError() == GL_NO_ERROR); - asprintf(&filename, "%s%03d.png", fileprefix, frame++); + (void)!asprintf(&filename, "%s%03d.png", fileprefix, frame++); printf("Writing %s...\n", filename); piglit_write_png(filename, base_format, piglit_width, |