Merge pull request #132 from andrewkww/warning_fixes

Fix a few compiler warnings

Thank you very much
This commit is contained in:
Manuel Kraemer 2013-02-27 09:34:49 -08:00
commit 20b41baff8
3 changed files with 6 additions and 5 deletions

View File

@ -77,7 +77,7 @@ readLine(unsigned char *line, int length, FILE *fp)
if (c > 128) {
// runlength
c &= 127;
int value = getc(fp);
unsigned char value = (unsigned char)getc(fp);
while (c--) {
line[x*4+i] = value;
x++;
@ -85,7 +85,8 @@ readLine(unsigned char *line, int length, FILE *fp)
} else {
// non- runlength
while (c--) {
line[x*4+i] = getc(fp);
unsigned char value = (unsigned char)getc(fp);
line[x*4+i] = value;
x++;
}
}

View File

@ -488,7 +488,7 @@ FarMeshFactory<T,U>::refineAdaptive( HbrMesh<T> * mesh, int maxIsolate ) {
for (int k=0; k<nv; ++k)
nextverts.insert( f->GetVertex(k) );
}
if (not (childedge = childvert->GetNextEdge(childedge)))
if ((childedge = childvert->GetNextEdge(childedge)) == NULL)
break;
}
}

View File

@ -418,7 +418,7 @@ OsdPtexTextureLoader::OptimizePacking( int maxnumpages )
}
// note: at least 2*GUTTER_WIDTH of margin required for each page to fit
_pagesize += GetPageMargin();
_pagesize += (unsigned short)GetPageMargin();
// grow the pagesize to make sure the optimization will not exceed the maximum
// number of pages allowed
@ -439,7 +439,7 @@ OsdPtexTextureLoader::OptimizePacking( int maxnumpages )
// traverse existing pages for a suitable slot ---------------
bool added=false;
for( unsigned long int p=firstslot; p<_pages.size(); ++p )
if( (added=_pages[p]->addBlock( b, GetGutterWidth() )) ) {
if( (added=_pages[p]->addBlock( b, GetGutterWidth() )) == true ) {
break;
}