flint++ static analyzer detected items (not all that were likely legit positives, but a start) as well as some clang detected unused vars, cleanup_

This commit is contained in:
DarthArgus
2016-02-18 22:56:34 -06:00
parent 13019a2b14
commit 3c50042abc
29 changed files with 20 additions and 358 deletions
@@ -30,7 +30,6 @@
namespace SpaceAvoidanceManagerNamespace
{
// Lag/Slop factors.
float const cs_lookAheadGain = 1.5f;
float const cs_shipBoundSphereRadiusGain = 1.5f;
// Dynamic and static query flags.
@@ -100,7 +100,7 @@ void SetupSharedFoundation::callbackWithExceptionHandling( void (*callback)(void
{
callback();
}
catch (__exception * mathException)
catch (const __exception * mathException)
{
FATAL(true, ("Math Exception: %s\n", mathException->name));
}
@@ -237,8 +237,6 @@ namespace SharedSaddleManagerNamespace
ConstCharCrcString const cs_defaultCoveringLogicalAppearanceName("lookup/mnt_wr_default_covering");
ConstCharCrcString const cs_saddleHardpointName("saddle");
char const * const cs_driverHardpointName = "player";
char const * const cs_passengerHardpointName = "passenger";
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@@ -88,10 +88,6 @@ namespace TargaFormatNamespace
#pragma pack(pop)
#endif
const uint ms_attributeMask = BINARY2(0000,1111);
const uint ms_xOriginLocationMask = BINARY2(0001,0000);
const uint ms_yOriginLocationMask = BINARY2(0010,0000);
static bool _loadImage(AbstractFile *, Image **image, Image::PixelFormat format=Image::PF_nonStandard);
static void _readUncompressedColorMapped1(
@@ -140,7 +140,7 @@ private:
void load_0005(const PortalPropertyTemplate &portalPropertyTemplate, int cellIndex, Iff &iff);
// disabled
PortalPropertyTemplateCell(PortalPropertyTemplateCell &);
PortalPropertyTemplateCell(const PortalPropertyTemplateCell &);
PortalPropertyTemplateCell &operator =(PortalPropertyTemplateCell &);
private:
@@ -22,13 +22,13 @@
const char WIN32_PATH_SEPARATOR = '\\';
const char LINUX_PATH_SEPARATOR = '/';
//#if defined(WIN32)
//const char PATH_SEPARATOR = WIN32_PATH_SEPARATOR;
//#elif defined(linux)
#if defined(WIN32)
const char PATH_SEPARATOR = WIN32_PATH_SEPARATOR;
#elif defined(linux)
const char PATH_SEPARATOR = LINUX_PATH_SEPARATOR;
//#else
//#error unknown OS
//#endif
#else
#error unknown OS
#endif
/**
@@ -176,36 +176,6 @@ static const char * const DefaultDataReturnValue[] =
"DefaultString"
};
// map enum ParamType to string equivalent
static const char * const EnumTypeNames[] =
{
"TYPE_NONE",
"TYPE_COMMENT",
"TYPE_INTEGER",
"TYPE_FLOAT",
"TYPE_BOOL",
"TYPE_STRING",
"TYPE_STRINGID",
"TYPE_VECTOR",
"TYPE_DYNAMIC_VAR",
"TYPE_TEMPLATE",
"TYPE_ENUM",
"TYPE_STRUCT",
"TYPE_TRIGGER_VOLUME",
"TYPE_FILENAME",
"NUM_PARAM_TYPES"
};
// map enum TemplateLocation to string equivalent
static const char * const EnumLocationNames[] =
{
"LOC_NONE",
"LOC_CLIENT",
"LOC_SERVER",
"LOC_SHARED"
};
//==============================================================================
// class methods