[Piglit] [PATCH 2/2] tests/texturing/bptc: Don't use zero-sized array initializers.

jfonseca at vmware.com jfonseca at vmware.com
Mon Oct 27 09:31:25 PDT 2014


From: José Fonseca <jfonseca at vmware.com>

IIRC they are not a standard C feature.  At any rate, they aren't
accepted by MSVC.
---
 tests/texturing/bptc-float-modes.c |  8 ++++----
 tests/texturing/bptc-modes.c       | 18 +++++++++---------
 2 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/tests/texturing/bptc-float-modes.c b/tests/texturing/bptc-float-modes.c
index f16de19..aa01ec2 100644
--- a/tests/texturing/bptc-float-modes.c
+++ b/tests/texturing/bptc-float-modes.c
@@ -168,7 +168,7 @@ bptc_float_modes[] = {
        { -1 } }
    },
    /* 10011 */
-   { /* reserved */ },
+   { 0 /* reserved */ },
    /* 10110 */
    { 5, 3,
      { { 0, 0, 0, 8, false }, { 3, 2, 0, 1, false }, { 2, 2, 4, 1, false },
@@ -181,7 +181,7 @@ bptc_float_modes[] = {
        { -1 } }
    },
    /* 10111 */
-   { /* reserved */ },
+   { 0 /* reserved */ },
    /* 11010 */
    { 5, 3,
      { { 0, 0, 0, 8, false }, { 3, 2, 1, 1, false }, { 2, 2, 4, 1, false },
@@ -194,7 +194,7 @@ bptc_float_modes[] = {
        { -1 } }
    },
    /* 11011 */
-   { /* reserved */ },
+   { 0 /* reserved */ },
    /* 11110 */
    { 5, 3,
      { { 0, 0, 0, 6, false }, { 3, 1, 4, 1, false }, { 3, 2, 0, 1, false },
@@ -208,7 +208,7 @@ bptc_float_modes[] = {
        { -1 } }
    },
    /* 11111 */
-   { /* reserved */ },
+   { 0 /* reserved */ },
 };
 
 static const uint8_t
diff --git a/tests/texturing/bptc-modes.c b/tests/texturing/bptc-modes.c
index 6a8b079..73f0750 100644
--- a/tests/texturing/bptc-modes.c
+++ b/tests/texturing/bptc-modes.c
@@ -139,7 +139,7 @@ bptc_blocks[] = {
 			0x4, 0x2, 0x4, 0x2  /* subsets 2    2    1    1(a) */
 		},
 		/* secondary indices */
-		{ },
+		{ 0 },
 		/* expected results */
 		{
 			0x00, 0x00, 0x00, 0xff, 0x48, 0x48, 0x48, 0xff,
@@ -174,7 +174,7 @@ bptc_blocks[] = {
 			0x4, 0x2, 0x4, 0x2  /* subsets 0    1    1    1(a) */
 		},
 		/* secondary indices */
-		{ },
+		{ 0 },
 		/* expected results */
 		{
 			0x00, 0x00, 0x00, 0xff, 0x39, 0x02, 0x39, 0xff,
@@ -202,7 +202,7 @@ bptc_blocks[] = {
 			{ 0x00, 0x10, 0x10, 0x00 }, { 0x00, 0x0d, 0x0d, 0x00 }
 		},
 		/* pbits */
-		{ },
+		{ 0 },
 		/* primary indices */
 		{
 			0x0, 0x0, 0x1, 0x2, /* subsets 0(a) 2    2    2    */
@@ -211,7 +211,7 @@ bptc_blocks[] = {
 			0x3, 0x3, 0x0, 0x0  /* subsets 0    2    2    2(a) */
 		},
 		/* secondary indices */
-		{ },
+		{ 0 },
 		/* expected results */
 		{
 			0x00, 0x00, 0x00, 0xff, 0x00, 0x84, 0x84, 0xff,
@@ -246,7 +246,7 @@ bptc_blocks[] = {
 			0x3, 0x3, 0x3, 0x0  /* subsets 0    0    0    1(a) */
 		},
 		/* secondary indices */
-		{ },
+		{ 0 },
 		/* expected results */
 		{
 			0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff,
@@ -270,7 +270,7 @@ bptc_blocks[] = {
 			{ 0x00, 0x0f, 0x1f, 0x10 }, { 0x1f, 0x0f, 0x00, 0x3f },
 		},
 		/* pbits */
-		{ },
+		{ 0 },
 		/* primary indices */
 		{
 			0x0, 0x1, 0x2, 0x3,
@@ -308,7 +308,7 @@ bptc_blocks[] = {
 			{ 0x00, 0x40, 0x7f, 0x10 }, { 0x7f, 0x40, 0x00, 0xff },
 		},
 		/* pbits */
-		{ },
+		{ 0 },
 		/* primary indices */
 		{
 			0x0, 0x1, 0x2, 0x3,
@@ -355,7 +355,7 @@ bptc_blocks[] = {
 			0xc, 0xd, 0xe, 0xf
 		},
 		/* secondary indices */
-		{ },
+		{ 0 },
 		/* expected results */
 		{
 			0x01, 0x81, 0xff, 0x21, 0x11, 0x81, 0xef, 0x2f,
@@ -390,7 +390,7 @@ bptc_blocks[] = {
 			0x0, 0x1, 0x1, 0x0  /* subsets 0    0    1    1(a) */
 		},
 		/* secondary indices */
-		{ },
+		{ 0 },
 		/* expected results */
 		{
 			0x00, 0x00, 0x00, 0x00, 0x54, 0x54, 0x54, 0x54,
-- 
1.9.1



More information about the Piglit mailing list