mirror of
https://github.com/enduro2d/enduro2d.git
synced 2025-12-15 00:11:55 +07:00
fix same CI warnings
This commit is contained in:
@@ -87,12 +87,7 @@ elseif(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
|
|||||||
/we4554 # check operator precedence for possible error; use parentheses to clarify precedence
|
/we4554 # check operator precedence for possible error; use parentheses to clarify precedence
|
||||||
/w14100 # unreferenced formal parameter
|
/w14100 # unreferenced formal parameter
|
||||||
/w14189 # local variable is initialized but not referenced
|
/w14189 # local variable is initialized but not referenced
|
||||||
/we4456 # declaration of 'var' hides previous local declaration
|
/we4456) # declaration of 'var' hides previous local declaration
|
||||||
)
|
|
||||||
if(CMAKE_CXX_FLAGS_RELWITHDEBINFO)
|
|
||||||
set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} /Ob2")
|
|
||||||
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /Ob2")
|
|
||||||
endif()
|
|
||||||
endif()
|
endif()
|
||||||
string(REPLACE ";" " " E2D_SHARED_CXX_FLAGS "${E2D_SHARED_CXX_FLAGS}")
|
string(REPLACE ";" " " E2D_SHARED_CXX_FLAGS "${E2D_SHARED_CXX_FLAGS}")
|
||||||
|
|
||||||
|
|||||||
@@ -53,8 +53,8 @@ namespace
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
owner.for_joined_components<spine_player_evt, spine_player>([
|
owner.for_joined_components<spine_player_evt>([
|
||||||
](ecs::entity e, const spine_player_evt& pe, spine_player& p) {
|
](ecs::entity e, const spine_player_evt& pe) {
|
||||||
for ( const auto& evt : pe.events() ) {
|
for ( const auto& evt : pe.events() ) {
|
||||||
if ( auto complete_evt = std::get_if<spine_player_evt::complete_evt>(&evt);
|
if ( auto complete_evt = std::get_if<spine_player_evt::complete_evt>(&evt);
|
||||||
complete_evt && complete_evt->message() == "to_walk" )
|
complete_evt && complete_evt->message() == "to_walk" )
|
||||||
|
|||||||
8
sources/3rdparty/bass/linux/bass.h
vendored
8
sources/3rdparty/bass/linux/bass.h
vendored
@@ -724,7 +724,7 @@ typedef struct {
|
|||||||
BYTE Reserved[190];
|
BYTE Reserved[190];
|
||||||
#if defined(__GNUC__) && __GNUC__<3
|
#if defined(__GNUC__) && __GNUC__<3
|
||||||
char CodingHistory[0]; // history
|
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
|
char CodingHistory[]; // history
|
||||||
#else
|
#else
|
||||||
char CodingHistory[1]; // history
|
char CodingHistory[1]; // history
|
||||||
@@ -762,7 +762,7 @@ typedef struct
|
|||||||
char URL[1024]; // uniform resource locator
|
char URL[1024]; // uniform resource locator
|
||||||
#if defined(__GNUC__) && __GNUC__<3
|
#if defined(__GNUC__) && __GNUC__<3
|
||||||
char TagText[0]; // free form text for scripts or tags
|
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
|
char TagText[]; // free form text for scripts or tags
|
||||||
#else
|
#else
|
||||||
char TagText[1]; // free form text for scripts or tags
|
char TagText[1]; // free form text for scripts or tags
|
||||||
@@ -785,7 +785,7 @@ typedef struct
|
|||||||
DWORD dwCuePoints;
|
DWORD dwCuePoints;
|
||||||
#if defined(__GNUC__) && __GNUC__<3
|
#if defined(__GNUC__) && __GNUC__<3
|
||||||
TAG_CUE_POINT CuePoints[0];
|
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[];
|
TAG_CUE_POINT CuePoints[];
|
||||||
#else
|
#else
|
||||||
TAG_CUE_POINT CuePoints[1];
|
TAG_CUE_POINT CuePoints[1];
|
||||||
@@ -816,7 +816,7 @@ typedef struct
|
|||||||
DWORD cbSamplerData;
|
DWORD cbSamplerData;
|
||||||
#if defined(__GNUC__) && __GNUC__<3
|
#if defined(__GNUC__) && __GNUC__<3
|
||||||
TAG_SMPL_LOOP SampleLoops[0];
|
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[];
|
TAG_SMPL_LOOP SampleLoops[];
|
||||||
#else
|
#else
|
||||||
TAG_SMPL_LOOP SampleLoops[1];
|
TAG_SMPL_LOOP SampleLoops[1];
|
||||||
|
|||||||
8
sources/3rdparty/bass/windows/bass.h
vendored
8
sources/3rdparty/bass/windows/bass.h
vendored
@@ -724,7 +724,7 @@ typedef struct {
|
|||||||
BYTE Reserved[190];
|
BYTE Reserved[190];
|
||||||
#if defined(__GNUC__) && __GNUC__<3
|
#if defined(__GNUC__) && __GNUC__<3
|
||||||
char CodingHistory[0]; // history
|
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
|
char CodingHistory[]; // history
|
||||||
#else
|
#else
|
||||||
char CodingHistory[1]; // history
|
char CodingHistory[1]; // history
|
||||||
@@ -762,7 +762,7 @@ typedef struct
|
|||||||
char URL[1024]; // uniform resource locator
|
char URL[1024]; // uniform resource locator
|
||||||
#if defined(__GNUC__) && __GNUC__<3
|
#if defined(__GNUC__) && __GNUC__<3
|
||||||
char TagText[0]; // free form text for scripts or tags
|
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
|
char TagText[]; // free form text for scripts or tags
|
||||||
#else
|
#else
|
||||||
char TagText[1]; // free form text for scripts or tags
|
char TagText[1]; // free form text for scripts or tags
|
||||||
@@ -785,7 +785,7 @@ typedef struct
|
|||||||
DWORD dwCuePoints;
|
DWORD dwCuePoints;
|
||||||
#if defined(__GNUC__) && __GNUC__<3
|
#if defined(__GNUC__) && __GNUC__<3
|
||||||
TAG_CUE_POINT CuePoints[0];
|
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[];
|
TAG_CUE_POINT CuePoints[];
|
||||||
#else
|
#else
|
||||||
TAG_CUE_POINT CuePoints[1];
|
TAG_CUE_POINT CuePoints[1];
|
||||||
@@ -816,7 +816,7 @@ typedef struct
|
|||||||
DWORD cbSamplerData;
|
DWORD cbSamplerData;
|
||||||
#if defined(__GNUC__) && __GNUC__<3
|
#if defined(__GNUC__) && __GNUC__<3
|
||||||
TAG_SMPL_LOOP SampleLoops[0];
|
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[];
|
TAG_SMPL_LOOP SampleLoops[];
|
||||||
#else
|
#else
|
||||||
TAG_SMPL_LOOP SampleLoops[1];
|
TAG_SMPL_LOOP SampleLoops[1];
|
||||||
|
|||||||
@@ -1100,6 +1100,7 @@ namespace e2d
|
|||||||
|
|
||||||
if ( tex->decl().is_compressed() ) {
|
if ( tex->decl().is_compressed() ) {
|
||||||
const v2u block_size = tex->decl().block_size();
|
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.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);
|
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(),
|
opengl::with_gl_bind_texture(state_->dbg(), tex->state().id(),
|
||||||
|
|||||||
@@ -231,7 +231,7 @@ TEST_CASE("intrusive_ptr") {
|
|||||||
REQUIRE(obj_t::dtor_counter == 4u);
|
REQUIRE(obj_t::dtor_counter == 4u);
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
std::make_unique<obj_t>(10);
|
E2D_UNUSED(std::make_unique<obj_t>(10));
|
||||||
intrusive_ptr<const obj_t> p1(new derived2_t());
|
intrusive_ptr<const obj_t> p1(new derived2_t());
|
||||||
intrusive_ptr<const derived2_t> p2 = static_pointer_cast<const derived2_t>(p1);
|
intrusive_ptr<const derived2_t> p2 = static_pointer_cast<const derived2_t>(p1);
|
||||||
REQUIRE(p2->i == 21);
|
REQUIRE(p2->i == 21);
|
||||||
|
|||||||
Reference in New Issue
Block a user