Re: [Piglit] [PATCH] vertex-program-two-side: Fix GCC format-security warnings.

2018-05-31 Thread Timothy Arceri

Thanks. Are these warning not enabled by default?

Reviewed-by: Timothy Arceri 

On 01/06/18 07:46, Vinson Lee wrote:

vertex-program-two-side.c: In function ‘piglit_display’:
vertex-program-two-side.c:370:3: warning: format not a string literal and no 
format arguments [-Wformat-security]
piglit_report_subtest_result(PIGLIT_SKIP, tests[3]);
^~~~
vertex-program-two-side.c:371:3: warning: format not a string literal and no 
format arguments [-Wformat-security]
piglit_report_subtest_result(PIGLIT_SKIP, tests[4]);
^~~~
vertex-program-two-side.c:372:3: warning: format not a string literal and no 
format arguments [-Wformat-security]
piglit_report_subtest_result(PIGLIT_SKIP, tests[5]);
^~~~
vertex-program-two-side.c:375:3: warning: format not a string literal and no 
format arguments [-Wformat-security]
piglit_report_subtest_result(PIGLIT_SKIP, tests[1]);
^~~~
vertex-program-two-side.c:376:3: warning: format not a string literal and no 
format arguments [-Wformat-security]
piglit_report_subtest_result(PIGLIT_SKIP, tests[2]);
^~~~
vertex-program-two-side.c:377:3: warning: format not a string literal and no 
format arguments [-Wformat-security]
piglit_report_subtest_result(PIGLIT_SKIP, tests[3]);
^~~~
vertex-program-two-side.c:378:3: warning: format not a string literal and no 
format arguments [-Wformat-security]
piglit_report_subtest_result(PIGLIT_SKIP, tests[4]);
^~~~
vertex-program-two-side.c:379:3: warning: format not a string literal and no 
format arguments [-Wformat-security]
piglit_report_subtest_result(PIGLIT_SKIP, tests[5]);
^~~~

Fixes: 09b3a817d273 ("ARB_tessellation_shader: test gl_*Color built-ins with 
tessellation shaders")
Signed-off-by: Vinson Lee 
---
  tests/spec/gl-2.0/vertex-program-two-side.c | 16 
  1 file changed, 8 insertions(+), 8 deletions(-)

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 a659e521ba5a..4623c70a65cd 100644
--- a/tests/spec/gl-2.0/vertex-program-two-side.c
+++ b/tests/spec/gl-2.0/vertex-program-two-side.c
@@ -367,16 +367,16 @@ piglit_display(void)
free(tcs_source);
free(tes_source);
} else {
-   piglit_report_subtest_result(PIGLIT_SKIP, tests[3]);
-   piglit_report_subtest_result(PIGLIT_SKIP, tests[4]);
-   piglit_report_subtest_result(PIGLIT_SKIP, tests[5]);
+   piglit_report_subtest_result(PIGLIT_SKIP, "%s", tests[3]);
+   piglit_report_subtest_result(PIGLIT_SKIP, "%s", tests[4]);
+   piglit_report_subtest_result(PIGLIT_SKIP, "%s", tests[5]);
}
} else {
-   piglit_report_subtest_result(PIGLIT_SKIP, tests[1]);
-   piglit_report_subtest_result(PIGLIT_SKIP, tests[2]);
-   piglit_report_subtest_result(PIGLIT_SKIP, tests[3]);
-   piglit_report_subtest_result(PIGLIT_SKIP, tests[4]);
-   piglit_report_subtest_result(PIGLIT_SKIP, tests[5]);
+   piglit_report_subtest_result(PIGLIT_SKIP, "%s", tests[1]);
+   piglit_report_subtest_result(PIGLIT_SKIP, "%s", tests[2]);
+   piglit_report_subtest_result(PIGLIT_SKIP, "%s", tests[3]);
+   piglit_report_subtest_result(PIGLIT_SKIP, "%s", tests[4]);
+   piglit_report_subtest_result(PIGLIT_SKIP, "%s", tests[5]);
}
  
  	return pass ? PIGLIT_PASS : PIGLIT_FAIL;



___
Piglit mailing list
Piglit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/piglit


Re: [Piglit] [PATCH] gl-3.2-compat: Fix GCC format-security warnings.

2018-05-31 Thread Timothy Arceri

Reviewed-by: Timothy Arceri 

On 01/06/18 07:31, Vinson Lee wrote:

glsl-fs-fogscale.c: In function ‘piglit_display’:
glsl-fs-fogscale.c:140:3: warning: format not a string literal and no format 
arguments [-Wformat-security]
piglit_report_subtest_result(PIGLIT_SKIP, tests[1]);
^~~~
glsl-fs-fogscale.c:141:3: warning: format not a string literal and no format 
arguments [-Wformat-security]
piglit_report_subtest_result(PIGLIT_SKIP, tests[2]);
^~~~

Fixes: e28f602973f6 ("gl-3.2-compat: test gl_FogFragCoord built-in with geometry 
shaders")
Signed-off-by: Vinson Lee 
---
  tests/shaders/glsl-fs-fogscale.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/shaders/glsl-fs-fogscale.c b/tests/shaders/glsl-fs-fogscale.c
index 8945371bfc0b..ff682dc48150 100644
--- a/tests/shaders/glsl-fs-fogscale.c
+++ b/tests/shaders/glsl-fs-fogscale.c
@@ -137,8 +137,8 @@ piglit_display(void)
pass = pass && test_prog(prog, tests[2]);
  
  	} else {

-   piglit_report_subtest_result(PIGLIT_SKIP, tests[1]);
-   piglit_report_subtest_result(PIGLIT_SKIP, tests[2]);
+   piglit_report_subtest_result(PIGLIT_SKIP, "%s", tests[1]);
+   piglit_report_subtest_result(PIGLIT_SKIP, "%s", tests[2]);
}
  
  	return pass ? PIGLIT_PASS : PIGLIT_FAIL;



___
Piglit mailing list
Piglit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/piglit


[Piglit] [PATCH] vertex-program-two-side: Fix GCC format-security warnings.

2018-05-31 Thread Vinson Lee
vertex-program-two-side.c: In function ‘piglit_display’:
vertex-program-two-side.c:370:3: warning: format not a string literal and no 
format arguments [-Wformat-security]
   piglit_report_subtest_result(PIGLIT_SKIP, tests[3]);
   ^~~~
vertex-program-two-side.c:371:3: warning: format not a string literal and no 
format arguments [-Wformat-security]
   piglit_report_subtest_result(PIGLIT_SKIP, tests[4]);
   ^~~~
vertex-program-two-side.c:372:3: warning: format not a string literal and no 
format arguments [-Wformat-security]
   piglit_report_subtest_result(PIGLIT_SKIP, tests[5]);
   ^~~~
vertex-program-two-side.c:375:3: warning: format not a string literal and no 
format arguments [-Wformat-security]
   piglit_report_subtest_result(PIGLIT_SKIP, tests[1]);
   ^~~~
vertex-program-two-side.c:376:3: warning: format not a string literal and no 
format arguments [-Wformat-security]
   piglit_report_subtest_result(PIGLIT_SKIP, tests[2]);
   ^~~~
vertex-program-two-side.c:377:3: warning: format not a string literal and no 
format arguments [-Wformat-security]
   piglit_report_subtest_result(PIGLIT_SKIP, tests[3]);
   ^~~~
vertex-program-two-side.c:378:3: warning: format not a string literal and no 
format arguments [-Wformat-security]
   piglit_report_subtest_result(PIGLIT_SKIP, tests[4]);
   ^~~~
vertex-program-two-side.c:379:3: warning: format not a string literal and no 
format arguments [-Wformat-security]
   piglit_report_subtest_result(PIGLIT_SKIP, tests[5]);
   ^~~~

Fixes: 09b3a817d273 ("ARB_tessellation_shader: test gl_*Color built-ins with 
tessellation shaders")
Signed-off-by: Vinson Lee 
---
 tests/spec/gl-2.0/vertex-program-two-side.c | 16 
 1 file changed, 8 insertions(+), 8 deletions(-)

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 a659e521ba5a..4623c70a65cd 100644
--- a/tests/spec/gl-2.0/vertex-program-two-side.c
+++ b/tests/spec/gl-2.0/vertex-program-two-side.c
@@ -367,16 +367,16 @@ piglit_display(void)
free(tcs_source);
free(tes_source);
} else {
-   piglit_report_subtest_result(PIGLIT_SKIP, tests[3]);
-   piglit_report_subtest_result(PIGLIT_SKIP, tests[4]);
-   piglit_report_subtest_result(PIGLIT_SKIP, tests[5]);
+   piglit_report_subtest_result(PIGLIT_SKIP, "%s", tests[3]);
+   piglit_report_subtest_result(PIGLIT_SKIP, "%s", tests[4]);
+   piglit_report_subtest_result(PIGLIT_SKIP, "%s", tests[5]);
}
} else {
-   piglit_report_subtest_result(PIGLIT_SKIP, tests[1]);
-   piglit_report_subtest_result(PIGLIT_SKIP, tests[2]);
-   piglit_report_subtest_result(PIGLIT_SKIP, tests[3]);
-   piglit_report_subtest_result(PIGLIT_SKIP, tests[4]);
-   piglit_report_subtest_result(PIGLIT_SKIP, tests[5]);
+   piglit_report_subtest_result(PIGLIT_SKIP, "%s", tests[1]);
+   piglit_report_subtest_result(PIGLIT_SKIP, "%s", tests[2]);
+   piglit_report_subtest_result(PIGLIT_SKIP, "%s", tests[3]);
+   piglit_report_subtest_result(PIGLIT_SKIP, "%s", tests[4]);
+   piglit_report_subtest_result(PIGLIT_SKIP, "%s", tests[5]);
}
 
return pass ? PIGLIT_PASS : PIGLIT_FAIL;
-- 
2.14.1

___
Piglit mailing list
Piglit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/piglit


[Piglit] [PATCH] gl-3.2-compat: Fix GCC format-security warnings.

2018-05-31 Thread Vinson Lee
glsl-fs-fogscale.c: In function ‘piglit_display’:
glsl-fs-fogscale.c:140:3: warning: format not a string literal and no format 
arguments [-Wformat-security]
   piglit_report_subtest_result(PIGLIT_SKIP, tests[1]);
   ^~~~
glsl-fs-fogscale.c:141:3: warning: format not a string literal and no format 
arguments [-Wformat-security]
   piglit_report_subtest_result(PIGLIT_SKIP, tests[2]);
   ^~~~

Fixes: e28f602973f6 ("gl-3.2-compat: test gl_FogFragCoord built-in with 
geometry shaders")
Signed-off-by: Vinson Lee 
---
 tests/shaders/glsl-fs-fogscale.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/shaders/glsl-fs-fogscale.c b/tests/shaders/glsl-fs-fogscale.c
index 8945371bfc0b..ff682dc48150 100644
--- a/tests/shaders/glsl-fs-fogscale.c
+++ b/tests/shaders/glsl-fs-fogscale.c
@@ -137,8 +137,8 @@ piglit_display(void)
pass = pass && test_prog(prog, tests[2]);
 
} else {
-   piglit_report_subtest_result(PIGLIT_SKIP, tests[1]);
-   piglit_report_subtest_result(PIGLIT_SKIP, tests[2]);
+   piglit_report_subtest_result(PIGLIT_SKIP, "%s", tests[1]);
+   piglit_report_subtest_result(PIGLIT_SKIP, "%s", tests[2]);
}
 
return pass ? PIGLIT_PASS : PIGLIT_FAIL;
-- 
2.14.1

___
Piglit mailing list
Piglit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/piglit