Warning fixes
This commit is contained in:
@@ -373,7 +373,7 @@ Lib3dsBool
|
||||
lib3ds_intb_write(Lib3dsIntb b, iostream *strm)
|
||||
{
|
||||
ASSERT(strm);
|
||||
strm->write((char*)b,1);
|
||||
strm->write((const char*)b,1);
|
||||
if (strm->fail()) {
|
||||
return(LIB3DS_FALSE);
|
||||
}
|
||||
@@ -400,7 +400,7 @@ lib3ds_intw_write(Lib3dsIntw w, iostream *strm)
|
||||
b[1]=(Lib3dsByte)(((Lib3dsWord)w & 0xFF00) >> 8);
|
||||
b[0]=(Lib3dsByte)((Lib3dsWord)w & 0x00FF);
|
||||
|
||||
strm->write((char*)b,2);
|
||||
strm->write((const char*)b,2);
|
||||
if (strm->fail()) {
|
||||
return(LIB3DS_FALSE);
|
||||
}
|
||||
@@ -429,7 +429,7 @@ lib3ds_intd_write(Lib3dsIntd d, iostream *strm)
|
||||
b[1]=(Lib3dsByte)(((Lib3dsDword)d & 0x0000FF00) >> 8);
|
||||
b[0]=(Lib3dsByte)(((Lib3dsDword)d & 0x000000FF));
|
||||
|
||||
strm->write((char*)b,4);
|
||||
strm->write((const char*)b,4);
|
||||
if (strm->fail()) {
|
||||
return(LIB3DS_FALSE);
|
||||
}
|
||||
|
||||
@@ -167,7 +167,9 @@ void FFmpegDecoderVideo::decodeLoop()
|
||||
|
||||
// Find out the frame pts
|
||||
|
||||
if (packet.packet.dts == AV_NOPTS_VALUE && m_frame->opaque != 0 && *reinterpret_cast<const int64_t*>(m_frame->opaque) != AV_NOPTS_VALUE)
|
||||
if (packet.packet.dts == AV_NOPTS_VALUE &&
|
||||
m_frame->opaque != 0 &&
|
||||
*reinterpret_cast<const int64_t*>(m_frame->opaque) != AV_NOPTS_VALUE)
|
||||
{
|
||||
pts = *reinterpret_cast<const int64_t*>(m_frame->opaque);
|
||||
}
|
||||
|
||||
@@ -46,7 +46,9 @@ WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
|
||||
#include <math.h>
|
||||
#include <string.h>
|
||||
|
||||
|
||||
#if defined(_MSC_VER) && defined(OSG_DISABLE_MSVC_WARNINGS)
|
||||
#pragma warning( disable : 4996 )
|
||||
#endif
|
||||
|
||||
#ifdef WIN32
|
||||
# ifndef LITTLE_ENDIAN
|
||||
@@ -2411,24 +2413,24 @@ void get_binary_item(
|
||||
*uint_val = (unsigned int) *double_val;
|
||||
break;
|
||||
case PLY_DOUBLE:
|
||||
result = fread (ptr, 8, 1, plyfile->fp);
|
||||
if(!result < 1)
|
||||
{
|
||||
throw ply::MeshException( "Error in reading PLY file."
|
||||
"fread not succeeded." );
|
||||
}
|
||||
if( plyfile->file_type == PLY_BINARY_BE )
|
||||
{
|
||||
swap8BE(ptr);
|
||||
}
|
||||
else
|
||||
{
|
||||
swap8LE(ptr);
|
||||
}
|
||||
*double_val = *((double *) ptr);
|
||||
*int_val = (int) *double_val;
|
||||
*uint_val = (unsigned int) *double_val;
|
||||
break;
|
||||
result = fread (ptr, 8, 1, plyfile->fp);
|
||||
if(result < 1)
|
||||
{
|
||||
throw ply::MeshException( "Error in reading PLY file."
|
||||
"fread not succeeded." );
|
||||
}
|
||||
if( plyfile->file_type == PLY_BINARY_BE )
|
||||
{
|
||||
swap8BE(ptr);
|
||||
}
|
||||
else
|
||||
{
|
||||
swap8LE(ptr);
|
||||
}
|
||||
*double_val = *((double *) ptr);
|
||||
*int_val = (int) *double_val;
|
||||
*uint_val = (unsigned int) *double_val;
|
||||
break;
|
||||
default:
|
||||
char error[100];
|
||||
sprintf (error, "get_binary_item: bad type = %d\n", type);
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// defined elsewhere
|
||||
class PlyFile;
|
||||
struct PlyFile;
|
||||
|
||||
namespace ply
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user