From Eric Sokolowsky, warning fixes for g++ 4.0 under Fedora Core 4.

This commit is contained in:
Robert Osfield
2005-08-25 17:53:01 +00:00
parent fb96298355
commit d154c2a4cd
10 changed files with 24 additions and 12 deletions

View File

@@ -116,6 +116,7 @@ namespace ive {
class ReadWrite{
public:
virtual ~ReadWrite() {}
virtual void write(DataOutputStream* out) const = 0;
virtual void read(DataInputStream* out) const = 0;
};

View File

@@ -570,7 +570,7 @@ osg::Drawable* ReaderWriter3DS::ReaderObject::createDrawable(Lib3dsMesh *m,Fac
// create normals.
if (_usePerVertexNormals)
{
osg::Vec3Array* osg_normals=osg_normals = new osg::Vec3Array(noVertex);
osg::Vec3Array* osg_normals = new osg::Vec3Array(noVertex);
// initialize normal list to zero's.
for (i=0; i<noVertex; ++i)
@@ -692,7 +692,8 @@ osg::Texture2D* ReaderWriter3DS::ReaderObject::createTexture(Lib3dsTextureMap *
// what is the wrap mode of the texture.
osg::Texture2D::WrapMode wm = ((texture->flags)&LIB3DS_NO_TILE) ?
osg::Texture2D::CLAMP : wm=osg::Texture2D::REPEAT;
osg::Texture2D::CLAMP :
osg::Texture2D::REPEAT;
osg_texture->setWrap(osg::Texture2D::WRAP_S,wm);
osg_texture->setWrap(osg::Texture2D::WRAP_T,wm);
osg_texture->setWrap(osg::Texture2D::WRAP_R,wm);

View File

@@ -345,7 +345,7 @@ int *numComponents_ret)
for (y = 0; y < height; y++)
{
fin.read((char*)linebuf,width*depth);
if (fin.gcount() != (unsigned int)width*depth)
if (fin.gcount() != (std::streamsize) (width*depth))
{
tgaerror = ERR_READ;
break;
@@ -384,7 +384,7 @@ int *numComponents_ret)
}
src = buf;
fin.read((char*)buf,size);
if (fin.gcount() != (unsigned int) size)
if (fin.gcount() != (std::streamsize) size)
{
tgaerror = ERR_READ;
break;