Fix tons of warnings when building with Mingw. Yes I know I did a few changes in bullet. I don't care, the warnings were too annoying
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@11002 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
@@ -75,7 +75,7 @@ private:
|
||||
public:
|
||||
LEAK_CHECK()
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
#if (defined(WIN32) || defined(_WIN32)) && !defined(__MINGW32__)
|
||||
#pragma warning(disable:4290)
|
||||
#endif
|
||||
~MusicInformation ();
|
||||
|
||||
@@ -25,11 +25,11 @@
|
||||
|
||||
#include <ogg/ogg.h>
|
||||
// Disable warning about potential loss of precision in vorbisfile.h
|
||||
#if defined(WIN32) && !defined(__CYGWIN__)
|
||||
#if defined(WIN32) && !defined(__CYGWIN__) && !defined(__MINGW32__)
|
||||
# pragma warning(disable:4244)
|
||||
#endif
|
||||
# include <vorbis/vorbisfile.h>
|
||||
#if defined(WIN32) && !defined(__CYGWIN__)
|
||||
#if defined(WIN32) && !defined(__CYGWIN__) && !defined(__MINGW32__)
|
||||
# pragma warning(default:4244)
|
||||
#endif
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ subject to the following restrictions:
|
||||
#ifndef BT_COLLISION_OBJECT_H
|
||||
#define BT_COLLISION_OBJECT_H
|
||||
|
||||
#if defined(WIN32) && !defined(__CYGWIN__)
|
||||
#if defined(WIN32) && !defined(__CYGWIN__) && !defined(__MINGW32__)
|
||||
# define isnan _isnan
|
||||
# define isinf(x) (!_finite(x))
|
||||
#else
|
||||
|
||||
@@ -21,7 +21,7 @@ subject to the following restrictions:
|
||||
#include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h"
|
||||
#include "BulletCollision/CollisionDispatch/btCollisionObject.h"
|
||||
|
||||
#if defined(WIN32) && !defined(__CYGWIN__)
|
||||
#if defined(WIN32) && !defined(__CYGWIN__) && !defined(__MINGW32__)
|
||||
# define isnan _isnan
|
||||
#endif
|
||||
#include <math.h>
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
#include "graphics/camera.hpp"
|
||||
|
||||
#if defined(WIN32) && !defined(__CYGWIN__)
|
||||
#if defined(WIN32) && !defined(__CYGWIN__) && !defined(__MINGW32__)
|
||||
# define isnan _isnan
|
||||
#else
|
||||
# include <math.h>
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
#include <string>
|
||||
|
||||
// For mkdir
|
||||
#if !defined(WIN32) || defined(__CYGWIN__)
|
||||
#if !defined(WIN32)
|
||||
# include <sys/stat.h>
|
||||
# include <sys/types.h>
|
||||
// For RemoveDirectory
|
||||
@@ -546,7 +546,7 @@ void FileManager::checkAndCreateConfigDir()
|
||||
}
|
||||
else
|
||||
{
|
||||
#if defined(WIN32)
|
||||
#if defined(WIN32) || defined(__CYGWIN__)
|
||||
// Try to use the APPDATA directory to store config files and highscore
|
||||
// lists. If not defined, used the current directory.
|
||||
if(getenv("APPDATA")!=NULL)
|
||||
@@ -628,7 +628,7 @@ void FileManager::checkAndCreateConfigDir()
|
||||
*/
|
||||
void FileManager::checkAndCreateAddonsDir()
|
||||
{
|
||||
#if defined(WIN32)
|
||||
#if defined(WIN32) || defined(__CYGWIN__)
|
||||
m_addons_dir = m_config_dir+"/addons";
|
||||
#elif defined(__APPLE__)
|
||||
m_addons_dir = getenv("HOME");
|
||||
@@ -845,7 +845,7 @@ void FileManager::listFiles(std::set<std::string>& result,
|
||||
{
|
||||
result.clear();
|
||||
|
||||
#ifdef WIN32
|
||||
#if defined(WIN32)
|
||||
std::string path = is_full_path ? dir : m_root_dir+"/"+dir;
|
||||
#else
|
||||
std::string path = is_full_path ? dir + "/" : m_root_dir+"/"+dir + "/";
|
||||
@@ -934,7 +934,7 @@ bool FileManager::removeDirectory(const std::string &name) const
|
||||
removeFile(full_path);
|
||||
}
|
||||
}
|
||||
#ifdef WIN32
|
||||
#if defined(WIN32)
|
||||
return RemoveDirectory(name.c_str())==TRUE;
|
||||
#else
|
||||
return remove(name.c_str())==0;
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
#include "tracks/track_manager.hpp"
|
||||
#include "utils/constants.hpp"
|
||||
|
||||
#if defined(WIN32) && !defined(__CYGWIN__)
|
||||
#if defined(WIN32) && !defined(__CYGWIN__) && !defined(__MINGW32__)
|
||||
// Disable warning for using 'this' in base member initializer list
|
||||
# pragma warning(disable:4355)
|
||||
#endif
|
||||
@@ -77,7 +77,7 @@ Kart::Kart (const std::string& ident, unsigned int world_kart_id,
|
||||
int position, const btTransform& init_transform)
|
||||
: AbstractKart(ident, world_kart_id, position, init_transform)
|
||||
|
||||
#if defined(WIN32) && !defined(__CYGWIN__)
|
||||
#if defined(WIN32) && !defined(__CYGWIN__) && !defined(__MINGW32__)
|
||||
# pragma warning(1:4355)
|
||||
#endif
|
||||
{
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
#ifndef HEADER_KART_MOTION_STATE_HPP
|
||||
#define HEADER_KART_MOTION_STATE_HPP
|
||||
|
||||
#if defined(WIN32) && !defined(__CYGWIN__)
|
||||
#if defined(WIN32) && !defined(__CYGWIN__) && !defined(__MINGW32__)
|
||||
# define isnan _isnan
|
||||
#else
|
||||
# include <math.h>
|
||||
|
||||
@@ -51,7 +51,7 @@ class GrandPrixData
|
||||
public:
|
||||
|
||||
/** Load the GrandPrixData from the given filename */
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
#if (defined(WIN32) || defined(_WIN32)) && !defined(__MINGW32__)
|
||||
#pragma warning(disable:4290)
|
||||
#endif
|
||||
GrandPrixData (const std::string filename) throw(std::logic_error);
|
||||
|
||||
@@ -169,12 +169,15 @@ bool TrackManager::loadTrack(const std::string& dirname)
|
||||
return false;
|
||||
}
|
||||
|
||||
if(track->getVersion()<stk_config->m_min_track_version ||
|
||||
if (track->getVersion()<stk_config->m_min_track_version ||
|
||||
track->getVersion()>stk_config->m_max_track_version)
|
||||
{
|
||||
fprintf(stderr, "[TrackManager] Warning: track '%s' is not supported "
|
||||
"by this binary, ignored.\n",
|
||||
track->getIdent().c_str());
|
||||
"by this binary, ignored. (Track is version %i, this "
|
||||
"executable supports from %i to %i)\n",
|
||||
track->getIdent().c_str(), track->getVersion(),
|
||||
stk_config->m_min_track_version,
|
||||
stk_config->m_max_track_version);
|
||||
delete track;
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user