fix same CI warnings

This commit is contained in:
2019-09-05 18:14:55 +07:00
parent c69c95ebc6
commit 0ae038b51e
6 changed files with 13 additions and 17 deletions

View File

@@ -724,7 +724,7 @@ typedef struct {
BYTE Reserved[190];
#if defined(__GNUC__) && __GNUC__<3
char CodingHistory[0]; // history
#elif 1 // change to 0 if compiler fails the following line
#elif 0 // change to 0 if compiler fails the following line
char CodingHistory[]; // history
#else
char CodingHistory[1]; // history
@@ -762,7 +762,7 @@ typedef struct
char URL[1024]; // uniform resource locator
#if defined(__GNUC__) && __GNUC__<3
char TagText[0]; // free form text for scripts or tags
#elif 1 // change to 0 if compiler fails the following line
#elif 0 // change to 0 if compiler fails the following line
char TagText[]; // free form text for scripts or tags
#else
char TagText[1]; // free form text for scripts or tags
@@ -785,7 +785,7 @@ typedef struct
DWORD dwCuePoints;
#if defined(__GNUC__) && __GNUC__<3
TAG_CUE_POINT CuePoints[0];
#elif 1 // change to 0 if compiler fails the following line
#elif 0 // change to 0 if compiler fails the following line
TAG_CUE_POINT CuePoints[];
#else
TAG_CUE_POINT CuePoints[1];
@@ -816,7 +816,7 @@ typedef struct
DWORD cbSamplerData;
#if defined(__GNUC__) && __GNUC__<3
TAG_SMPL_LOOP SampleLoops[0];
#elif 1 // change to 0 if compiler fails the following line
#elif 0 // change to 0 if compiler fails the following line
TAG_SMPL_LOOP SampleLoops[];
#else
TAG_SMPL_LOOP SampleLoops[1];

View File

@@ -724,7 +724,7 @@ typedef struct {
BYTE Reserved[190];
#if defined(__GNUC__) && __GNUC__<3
char CodingHistory[0]; // history
#elif 1 // change to 0 if compiler fails the following line
#elif 0 // change to 0 if compiler fails the following line
char CodingHistory[]; // history
#else
char CodingHistory[1]; // history
@@ -762,7 +762,7 @@ typedef struct
char URL[1024]; // uniform resource locator
#if defined(__GNUC__) && __GNUC__<3
char TagText[0]; // free form text for scripts or tags
#elif 1 // change to 0 if compiler fails the following line
#elif 0 // change to 0 if compiler fails the following line
char TagText[]; // free form text for scripts or tags
#else
char TagText[1]; // free form text for scripts or tags
@@ -785,7 +785,7 @@ typedef struct
DWORD dwCuePoints;
#if defined(__GNUC__) && __GNUC__<3
TAG_CUE_POINT CuePoints[0];
#elif 1 // change to 0 if compiler fails the following line
#elif 0 // change to 0 if compiler fails the following line
TAG_CUE_POINT CuePoints[];
#else
TAG_CUE_POINT CuePoints[1];
@@ -816,7 +816,7 @@ typedef struct
DWORD cbSamplerData;
#if defined(__GNUC__) && __GNUC__<3
TAG_SMPL_LOOP SampleLoops[0];
#elif 1 // change to 0 if compiler fails the following line
#elif 0 // change to 0 if compiler fails the following line
TAG_SMPL_LOOP SampleLoops[];
#else
TAG_SMPL_LOOP SampleLoops[1];

View File

@@ -1100,6 +1100,7 @@ namespace e2d
if ( tex->decl().is_compressed() ) {
const v2u block_size = tex->decl().block_size();
E2D_UNUSED(block_size);
E2D_ASSERT(region.position.x % block_size.x == 0 && region.position.y % block_size.y == 0);
E2D_ASSERT(region.size.x % block_size.x == 0 && region.size.y % block_size.y == 0);
opengl::with_gl_bind_texture(state_->dbg(), tex->state().id(),