mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-15 16:44:36 +00:00
visual studio 2012 Level 4 warning fixes
This commit is contained in:
parent
835649aa2f
commit
502e346eb6
8 changed files with 19 additions and 24 deletions
|
|
@ -3158,9 +3158,9 @@ U32 ShapeBase::packUpdate(NetConnection *con, U32 mask, BitStream *stream)
|
||||||
stream->writeFlag(image.triggerDown);
|
stream->writeFlag(image.triggerDown);
|
||||||
stream->writeFlag(image.altTriggerDown);
|
stream->writeFlag(image.altTriggerDown);
|
||||||
|
|
||||||
for (U32 i=0; i<ShapeBaseImageData::MaxGenericTriggers; ++i)
|
for (U32 j=0; j<ShapeBaseImageData::MaxGenericTriggers; ++j)
|
||||||
{
|
{
|
||||||
stream->writeFlag(image.genericTrigger[i]);
|
stream->writeFlag(image.genericTrigger[j]);
|
||||||
}
|
}
|
||||||
|
|
||||||
stream->writeInt(image.fireCount,3);
|
stream->writeInt(image.fireCount,3);
|
||||||
|
|
|
||||||
|
|
@ -1910,8 +1910,11 @@ extern int isatty (int );
|
||||||
b->yy_bs_column = 0;
|
b->yy_bs_column = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
|
#ifdef _MSC_VER
|
||||||
|
b->yy_is_interactive = file ? (isatty( _fileno(file) ) > 0) : 0;
|
||||||
|
#else
|
||||||
|
b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
|
||||||
|
#endif // _MSC_VER
|
||||||
errno = oerrno;
|
errno = oerrno;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2058,13 +2058,6 @@ yydestruct (yymsg, yytype, yyvaluep)
|
||||||
if (!yymsg)
|
if (!yymsg)
|
||||||
yymsg = "Deleting";
|
yymsg = "Deleting";
|
||||||
YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
|
YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
|
||||||
|
|
||||||
switch (yytype)
|
|
||||||
{
|
|
||||||
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -479,7 +479,7 @@ DefineConsoleFunction( strreplace, const char*, ( const char* source, const char
|
||||||
if(!scan)
|
if(!scan)
|
||||||
{
|
{
|
||||||
dStrcpy(ret + dstp, source + scanp);
|
dStrcpy(ret + dstp, source + scanp);
|
||||||
return ret;
|
break;
|
||||||
}
|
}
|
||||||
U32 len = scan - (source + scanp);
|
U32 len = scan - (source + scanp);
|
||||||
dStrncpy(ret + dstp, source + scanp, len);
|
dStrncpy(ret + dstp, source + scanp, len);
|
||||||
|
|
|
||||||
|
|
@ -108,7 +108,7 @@ compare_right(const nat_char* a, const nat_char* b)
|
||||||
remember it in BIAS. */
|
remember it in BIAS. */
|
||||||
for (;; a++, b++) {
|
for (;; a++, b++) {
|
||||||
if (!nat_isdigit(*a) && !nat_isdigit(*b))
|
if (!nat_isdigit(*a) && !nat_isdigit(*b))
|
||||||
return bias;
|
break;
|
||||||
else if (!nat_isdigit(*a))
|
else if (!nat_isdigit(*a))
|
||||||
return -1;
|
return -1;
|
||||||
else if (!nat_isdigit(*b))
|
else if (!nat_isdigit(*b))
|
||||||
|
|
@ -123,7 +123,7 @@ compare_right(const nat_char* a, const nat_char* b)
|
||||||
return bias;
|
return bias;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return bias;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -134,7 +134,7 @@ compare_left(const nat_char* a, const nat_char* b)
|
||||||
different value wins. */
|
different value wins. */
|
||||||
for (;; a++, b++) {
|
for (;; a++, b++) {
|
||||||
if (!nat_isdigit(*a) && !nat_isdigit(*b))
|
if (!nat_isdigit(*a) && !nat_isdigit(*b))
|
||||||
return 0;
|
break;
|
||||||
else if (!nat_isdigit(*a))
|
else if (!nat_isdigit(*a))
|
||||||
return -1;
|
return -1;
|
||||||
else if (!nat_isdigit(*b))
|
else if (!nat_isdigit(*b))
|
||||||
|
|
|
||||||
|
|
@ -407,6 +407,7 @@ public:
|
||||||
{
|
{
|
||||||
AssertFatal(IsPlaying(), "Journal::Read - not playing right now.");
|
AssertFatal(IsPlaying(), "Journal::Read - not playing right now.");
|
||||||
bool r = mFile->read(v);
|
bool r = mFile->read(v);
|
||||||
|
TORQUE_UNUSED(r);
|
||||||
AssertFatal(r, "Journal::Read - failed to read!");
|
AssertFatal(r, "Journal::Read - failed to read!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -429,6 +430,7 @@ public:
|
||||||
{
|
{
|
||||||
AssertFatal(IsRecording(), "Journal::Write - not recording right now.");
|
AssertFatal(IsRecording(), "Journal::Write - not recording right now.");
|
||||||
bool r = mFile->write(v);
|
bool r = mFile->write(v);
|
||||||
|
TORQUE_UNUSED(r);
|
||||||
AssertFatal(r, "Journal::Write - failed to write!");
|
AssertFatal(r, "Journal::Write - failed to write!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -99,12 +99,11 @@ namespace CPUInfo {
|
||||||
//
|
//
|
||||||
static unsigned int CpuIDSupported(void)
|
static unsigned int CpuIDSupported(void)
|
||||||
{
|
{
|
||||||
unsigned int MaxInputValue;
|
unsigned int maxInputValue = 0;
|
||||||
// If CPUID instruction is supported
|
// If CPUID instruction is supported
|
||||||
#ifdef TORQUE_COMPILER_GCC
|
#ifdef TORQUE_COMPILER_GCC
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
MaxInputValue = 0;
|
|
||||||
// call cpuid with eax = 0
|
// call cpuid with eax = 0
|
||||||
asm
|
asm
|
||||||
(
|
(
|
||||||
|
|
@ -112,7 +111,7 @@ namespace CPUInfo {
|
||||||
"xorl %%eax,%%eax\n\t"
|
"xorl %%eax,%%eax\n\t"
|
||||||
"cpuid\n\t"
|
"cpuid\n\t"
|
||||||
"popl %%ebx\n\t"
|
"popl %%ebx\n\t"
|
||||||
: "=a" (MaxInputValue)
|
: "=a" (maxInputValue)
|
||||||
:
|
:
|
||||||
: "%ecx", "%edx"
|
: "%ecx", "%edx"
|
||||||
);
|
);
|
||||||
|
|
@ -124,25 +123,23 @@ namespace CPUInfo {
|
||||||
#elif defined( TORQUE_COMPILER_VISUALC )
|
#elif defined( TORQUE_COMPILER_VISUALC )
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
MaxInputValue = 0;
|
|
||||||
// call cpuid with eax = 0
|
// call cpuid with eax = 0
|
||||||
__asm
|
__asm
|
||||||
{
|
{
|
||||||
xor eax, eax
|
xor eax, eax
|
||||||
cpuid
|
cpuid
|
||||||
mov MaxInputValue, eax
|
mov maxInputValue, eax
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (...)
|
catch (...)
|
||||||
{
|
{
|
||||||
return(0); // cpuid instruction is unavailable
|
// cpuid instruction is unavailable
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
# error Not implemented.
|
# error Not implemented.
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return MaxInputValue;
|
return maxInputValue;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -800,7 +800,7 @@ void TerrainMacroMapFeatHLSL::processPix( Vector<ShaderComponent*> &componentL
|
||||||
meta->addStatement( new GenOp( " @ *= @.y * @.w;\r\n",
|
meta->addStatement( new GenOp( " @ *= @.y * @.w;\r\n",
|
||||||
detailColor, detailInfo, inDet ) );
|
detailColor, detailInfo, inDet ) );
|
||||||
|
|
||||||
Var *baseColor = (Var*)LangElement::find( "baseColor" );
|
//Var *baseColor = (Var*)LangElement::find( "baseColor" );
|
||||||
Var *outColor = (Var*)LangElement::find( "col" );
|
Var *outColor = (Var*)LangElement::find( "col" );
|
||||||
|
|
||||||
meta->addStatement( new GenOp( " @ = lerp( @, @ + @, @ );\r\n",
|
meta->addStatement( new GenOp( " @ = lerp( @, @ + @, @ );\r\n",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue