Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKent Mein <mein@cs.umn.edu>2005-04-28 18:37:15 +0400
committerKent Mein <mein@cs.umn.edu>2005-04-28 18:37:15 +0400
commitb705434c72ec268e0a2c23124d679a7d1b8c0a69 (patch)
treede5b55174c0493f7fa0dfca1ef679025444aec9c /source/blender
parent1d97a448cb2c6e67fa0fa2ceba311d141bed3951 (diff)
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
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/blenkernel/intern/softbody.c1
-rw-r--r--source/blender/blenkernel/intern/text.c5
-rw-r--r--source/blender/readblenfile/stub/Makefile3
-rw-r--r--source/blender/src/editface.c2
-rw-r--r--source/blender/src/resources.c6
5 files changed, 9 insertions, 8 deletions
diff --git a/source/blender/blenkernel/intern/softbody.c b/source/blender/blenkernel/intern/softbody.c
index 13b587be4fe..0b78ead13c8 100644
--- a/source/blender/blenkernel/intern/softbody.c
+++ b/source/blender/blenkernel/intern/softbody.c
@@ -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);
diff --git a/source/blender/blenkernel/intern/text.c b/source/blender/blenkernel/intern/text.c
index 554c6940b84..d46742a6328 100644
--- a/source/blender/blenkernel/intern/text.c
+++ b/source/blender/blenkernel/intern/text.c
@@ -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;
}
+
diff --git a/source/blender/readblenfile/stub/Makefile b/source/blender/readblenfile/stub/Makefile
index 04c6b0e5f8d..c5a9570522f 100644
--- a/source/blender/readblenfile/stub/Makefile
+++ b/source/blender/readblenfile/stub/Makefile
@@ -40,7 +40,8 @@ ifeq ($(OS),$(findstring $(OS), "beos darwin freebsd linux openbsd solaris windo
CFLAGS += -funsigned-char
endif
-CFLAGS += $(LEVEL_2_C_WARNINGS)
+CFLAGS += $(LEVEL_2_C_WARNINGS)
+CFLAGS += $(FIX_STUBS_WARNINGS)
# path to our own external headerfiles
CPPFLAGS += -I..
diff --git a/source/blender/src/editface.c b/source/blender/src/editface.c
index 06b79b98f65..4f660db90f4 100644
--- a/source/blender/src/editface.c
+++ b/source/blender/src/editface.c
@@ -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;
diff --git a/source/blender/src/resources.c b/source/blender/src/resources.c
index cd3d0990644..a8a5f05ad27 100644
--- a/source/blender/src/resources.c
+++ b/source/blender/src/resources.c
@@ -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);
}