Merge pull request #2380 from nado/clang-fix
Fixes few warnings at compilation
This commit is contained in:
commit
a69eb99094
@ -25,8 +25,14 @@ elseif(MINGW)
|
||||
add_definitions(-D_IRR_STATIC_LIB_)
|
||||
add_definitions(-D_CRT_SECURE_NO_WARNINGS) # Shut up about unsafe stuff
|
||||
else()
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} -Wall -pipe -O3 -fno-exceptions -fstrict-aliasing -fexpensive-optimizations -I/usr/X11R6/include")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -pipe -O3 -fno-exceptions -fstrict-aliasing -fexpensive-optimizations -I/usr/X11R6/include")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -pipe -O3 -fno-exceptions -fstrict-aliasing -I/usr/X11R6/include")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} -Wall -pipe -O3 -fno-exceptions -fstrict-aliasing -I/usr/X11R6/include")
|
||||
if(CMAKE_COMPILER_IS_GNUCC)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fexpensive-optimizations")
|
||||
endif()
|
||||
if(CMAKE_COMPILER_IS_GNUCXX)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fexpensive-optimizations")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Xrandr
|
||||
|
@ -27,7 +27,7 @@ CParticleMeshEmitter::CParticleMeshEmitter(
|
||||
MinParticlesPerSecond(minParticlesPerSecond), MaxParticlesPerSecond(maxParticlesPerSecond),
|
||||
MinStartColor(minStartColor), MaxStartColor(maxStartColor),
|
||||
MinLifeTime(lifeTimeMin), MaxLifeTime(lifeTimeMax),
|
||||
Time(0), Emitted(0), MaxAngleDegrees(maxAngleDegrees),
|
||||
Time(0), MaxAngleDegrees(maxAngleDegrees),
|
||||
EveryMeshVertex(everyMeshVertex), UseNormalDirection(useNormalDirection)
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
|
@ -145,7 +145,6 @@ private:
|
||||
u32 MinLifeTime, MaxLifeTime;
|
||||
|
||||
u32 Time;
|
||||
u32 Emitted;
|
||||
s32 MaxAngleDegrees;
|
||||
|
||||
bool EveryMeshVertex;
|
||||
|
@ -25,7 +25,7 @@ CParticlePointEmitter::CParticlePointEmitter(
|
||||
MaxParticlesPerSecond(maxParticlesPerSecond),
|
||||
MinStartColor(minStartColor), MaxStartColor(maxStartColor),
|
||||
MinLifeTime(lifeTimeMin), MaxLifeTime(lifeTimeMax),
|
||||
MaxAngleDegrees(maxAngleDegrees), Time(0), Emitted(0)
|
||||
MaxAngleDegrees(maxAngleDegrees), Time(0)
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
setDebugName("CParticlePointEmitter");
|
||||
|
@ -112,7 +112,6 @@ private:
|
||||
s32 MaxAngleDegrees;
|
||||
|
||||
u32 Time;
|
||||
u32 Emitted;
|
||||
};
|
||||
|
||||
} // end namespace scene
|
||||
|
@ -1248,8 +1248,6 @@ void PostProcessing::renderHorizontalBlur(const FrameBuffer &in_fbo,
|
||||
{
|
||||
assert(in_fbo.getWidth() == auxiliary.getWidth() &&
|
||||
in_fbo.getHeight() == auxiliary.getHeight());
|
||||
float inv_width = 1.0f / in_fbo.getWidth();
|
||||
float inv_height = 1.0f / in_fbo.getHeight();
|
||||
|
||||
auxiliary.bind();
|
||||
Gaussian6HBlurShader::getInstance()->render(in_fbo, in_fbo.getWidth(),
|
||||
@ -1268,8 +1266,6 @@ void PostProcessing::renderGaussian17TapBlur(const FrameBuffer &in_fbo,
|
||||
in_fbo.getHeight() == auxiliary.getHeight());
|
||||
if (CVS->supportsComputeShadersFiltering())
|
||||
glMemoryBarrier(GL_FRAMEBUFFER_BARRIER_BIT);
|
||||
float inv_width = 1.0f / in_fbo.getWidth();
|
||||
float inv_height = 1.0f / in_fbo.getHeight();
|
||||
{
|
||||
if (!CVS->supportsComputeShadersFiltering())
|
||||
{
|
||||
|
@ -538,12 +538,7 @@ void btKart::updateVehicle( btScalar step )
|
||||
|
||||
btScalar proj = fwd.dot(wheel.m_raycastInfo.m_contactNormalWS);
|
||||
fwd -= wheel.m_raycastInfo.m_contactNormalWS * proj;
|
||||
|
||||
btScalar proj2 = fwd.dot(vel);
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// If configured, add a force to keep karts on the track
|
||||
|
@ -275,7 +275,7 @@ void History::Load()
|
||||
// Optional (not supported in older history files): include reverse
|
||||
fgets(s, 1023, fd);
|
||||
char r;
|
||||
if (!sscanf(s, "reverse: %c", &r) != 1)
|
||||
if (sscanf(s, "reverse: %c", &r) == 1)
|
||||
{
|
||||
fgets(s, 1023, fd);
|
||||
race_manager->setReverseTrack(r == 'y');
|
||||
|
@ -66,7 +66,6 @@ namespace Scripting
|
||||
|
||||
int getChallengeRequiredPoints(std::string* challenge_name)
|
||||
{
|
||||
::Track* track = World::getWorld()->getTrack();
|
||||
const ChallengeData* challenge = unlock_manager->getChallengeData(*challenge_name);
|
||||
if (challenge == NULL)
|
||||
{
|
||||
@ -81,7 +80,6 @@ namespace Scripting
|
||||
|
||||
bool isChallengeUnlocked(std::string* challenge_name)
|
||||
{
|
||||
::Track* track = World::getWorld()->getTrack();
|
||||
const ChallengeData* challenge = unlock_manager->getChallengeData(*challenge_name);
|
||||
if (challenge == NULL)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user