On 12/23/2013 06:00 PM, Vinson Lee wrote:
This patch fixes these GCC warnings.

fbo-incomplete.cpp: In function ‘bool invalid_1d_array_layer()’:
fbo-incomplete.cpp:304:57: warning: format not a string literal and no format 
arguments [-Wformat-security]
fbo-incomplete.cpp: In function ‘bool invalid_2d_array_layer()’:
fbo-incomplete.cpp:331:57: warning: format not a string literal and no format 
arguments [-Wformat-security]
fbo-incomplete.cpp: In function ‘bool invalid_cube_array_layer()’:
fbo-incomplete.cpp:358:57: warning: format not a string literal and no format 
arguments [-Wformat-security]

Signed-off-by: Vinson Lee <[email protected]>
---
  tests/fbo/fbo-incomplete.cpp |    6 +++---
  1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tests/fbo/fbo-incomplete.cpp b/tests/fbo/fbo-incomplete.cpp
index 292139c..498a4a4 100644
--- a/tests/fbo/fbo-incomplete.cpp
+++ b/tests/fbo/fbo-incomplete.cpp
@@ -301,7 +301,7 @@ invalid_1d_array_layer(void)

        if (!piglit_is_extension_supported("GL_EXT_texture_array")
            && piglit_get_gl_version() < 30) {
-               piglit_report_subtest_result(PIGLIT_SKIP, subtest_name);
+               piglit_report_subtest_result(PIGLIT_SKIP, "%s", subtest_name);
                return true;
        }

@@ -328,7 +328,7 @@ invalid_2d_array_layer(void)

        if (!piglit_is_extension_supported("GL_EXT_texture_array")
            && piglit_get_gl_version() < 30) {
-               piglit_report_subtest_result(PIGLIT_SKIP, subtest_name);
+               piglit_report_subtest_result(PIGLIT_SKIP, "%s", subtest_name);
                return true;
        }

@@ -355,7 +355,7 @@ invalid_cube_array_layer(void)

        if (!piglit_is_extension_supported("GL_ARB_texture_cube_map_array")
            && piglit_get_gl_version() < 40) {
-               piglit_report_subtest_result(PIGLIT_SKIP, subtest_name);
+               piglit_report_subtest_result(PIGLIT_SKIP, "%s", subtest_name);
                return true;
        }



Reviewed-by: Brian Paul <[email protected]>


_______________________________________________
Piglit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/piglit

Reply via email to