Warning fixes found under hardest mode of OpenWatcom. Seems clean in Borland, MinGW and DMC.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29684 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Włodzimierz Skiba
2004-10-06 20:54:57 +00:00
parent 958d3a7e4b
commit 925e9792d3
46 changed files with 377 additions and 469 deletions

View File

@@ -63,7 +63,7 @@ static wxInt32 read_short(FILE *f)
// when using the direct evaluation in the return statement
wxInt32 first = read_char(f) ;
wxInt32 second = read_char(f) ;
return (first<<8) | second ;
}
@@ -91,7 +91,7 @@ static int read_string(FILE *f, char *s)
do {
c = read_char(f);
if (cnt < LW_MAX_NAME_LEN)
s[cnt] = c;
s[cnt] = (char)c;
else
s[LW_MAX_NAME_LEN-1] = 0;
cnt++;
@@ -170,7 +170,7 @@ static void read_surf(FILE *f, int nbytes, lwObject *lwo)
static void read_pols(FILE *f, int nbytes, lwObject *lwo)
{
int guess_cnt = lwo->face_cnt;
while (nbytes > 0) {
lwFace *face;
int i;
@@ -188,17 +188,17 @@ static void read_pols(FILE *f, int nbytes, lwObject *lwo)
/* allocate space for points */
face->index = (int*) calloc(sizeof(int)*face->index_cnt,1);
/* read points in */
for (i=0; i<face->index_cnt; i++) {
face->index[i] = read_short(f);
nbytes -= 2;
}
/* read surface material */
face->material = read_short(f);
nbytes -= 2;
/* skip over detail polygons */
if (face->material < 0) {
int det_cnt;