A couple more simple gcc4.X warnings fixed.

softbody.c I removed an unused var.
text.c added return values to 2 return statements that didn't have anything.
Makefile added $(FIX_STUBS_WARNINGS) to CFLAGS for the stub.
source/blender/src/editface.c  fixed up int vs unsigned int stuff
source/blender/src/resources.c had two vars declared as unsigned char *
and then inputs to them were cast as char * so updated the casts.

Kent
This commit is contained in:
2005-04-28 14:37:15 +00:00
parent 1d97a448cb
commit b705434c72
5 changed files with 9 additions and 8 deletions

View File

@@ -301,7 +301,6 @@ static int sb_deflect_face(Object *ob,float *actpos, float *futurepos,float *col
{
int deflected;
float s_actpos[3], s_futurepos[3];
SoftBody *sb= ob->soft; // is supposed to be there
VECCOPY(s_actpos,actpos);
if(futurepos)
VECCOPY(s_futurepos,futurepos);

View File

@@ -2173,8 +2173,8 @@ int setcurr_tab (Text *text)
char *word = ":";
char *comm = "#";
char back_words[3][7] = {"return", "break", "pass"};
if (!text) return;
if (!text->curl) return;
if (!text) return 0;
if (!text->curl) return 0;
while (text->curl->line[i] == '\t')
{
@@ -2210,3 +2210,4 @@ int setcurr_tab (Text *text)
}
return i;
}

View File

@@ -41,6 +41,7 @@ ifeq ($(OS),$(findstring $(OS), "beos darwin freebsd linux openbsd solaris windo
endif
CFLAGS += $(LEVEL_2_C_WARNINGS)
CFLAGS += $(FIX_STUBS_WARNINGS)
# path to our own external headerfiles
CPPFLAGS += -I..

View File

@@ -1503,7 +1503,7 @@ void face_draw()
Image *img=NULL, *img_old = NULL;
IMG_BrushPtr brush;
IMG_CanvasPtr canvas = 0;
int rowBytes, face_index;
unsigned int rowBytes, face_index;
char *warn_packed_file = 0;
float uv[2], uv_old[2];
extern VPaint Gvp;

View File

@@ -217,7 +217,7 @@ static void def_icon(ImBuf *bbuf, GLuint texid, BIFIconID icon, int xidx, int yi
if (iconidx>=0 && iconidx<BIFNICONIDS) {
int rowstride= bbuf->x*4;
unsigned char *start= ((char*) bbuf->rect) + (yidx*21 + 3 + offsy)*rowstride + (xidx*20 + 3 + offsx)*4;
unsigned char *start= ((unsigned char*) bbuf->rect) + (yidx*21 + 3 + offsy)*rowstride + (xidx*20 + 3 + offsx)*4;
common_icons_arr[iconidx]=
icon_from_data(start, texid, (xidx*20 + 3 + offsx), (yidx*21 + 3 + offsy), w, h, rowstride);
@@ -275,7 +275,7 @@ void BIF_resources_init(void)
for (y=0; y<12; y++) {
for (x=0; x<21; x++) {
int rowstride= bbuf->x*4;
unsigned char *start= ((char*) bbuf->rect) + (y*21 + 3)*rowstride + (x*20 + 3)*4;
unsigned char *start= ((unsigned char*) bbuf->rect) + (y*21 + 3)*rowstride + (x*20 + 3)*4;
unsigned char transp[4];
/* this sets backdrop of icon to zero alpha */
transp[0]= start[0];
@@ -285,7 +285,7 @@ void BIF_resources_init(void)
clear_transp_rect_soft(transp, start, 20, 21, rowstride);
/* this sets outside of icon to zero alpha */
start= ((char*) bbuf->rect) + (y*21)*rowstride + (x*20)*4;
start= ((unsigned char*) bbuf->rect) + (y*21)*rowstride + (x*20)*4;
QUATCOPY(transp, start);
clear_transp_rect(transp, start, 20, 21, rowstride);
}