Fix numerous gcc warnings.
This commit is contained in:
@@ -907,11 +907,12 @@ static void free_scratch(SoftBody *sb)
|
||||
if(sb->scratch){
|
||||
/* todo make sure everything is cleaned up nicly */
|
||||
if (sb->scratch->colliderhash){
|
||||
BLI_ghash_free(sb->scratch->colliderhash, NULL, ccd_mesh_free); /*this hoepfully will free all caches*/
|
||||
BLI_ghash_free(sb->scratch->colliderhash, NULL,
|
||||
(GHashValFreeFP) ccd_mesh_free); /*this hoepfully will free all caches*/
|
||||
sb->scratch->colliderhash = NULL;
|
||||
}
|
||||
if (sb->scratch->bodyface){
|
||||
MEM_freeN(sb->scratch->bodyface);
|
||||
MEM_freeN(sb->scratch->bodyface);
|
||||
}
|
||||
MEM_freeN(sb->scratch);
|
||||
sb->scratch = NULL;
|
||||
@@ -1002,16 +1003,17 @@ static int query_external_colliders(Object *me)
|
||||
return(are_there_deflectors(me->lay));
|
||||
}
|
||||
|
||||
#if 0
|
||||
static int query_external_forces(Object *me)
|
||||
{
|
||||
/* silly but true: we need to create effector cache to see if anything is in it */
|
||||
ListBase *ec = pdInitEffectors(me,NULL);
|
||||
int result = 0;
|
||||
if (ec){
|
||||
result = 1;
|
||||
pdEndEffectors(ec); /* sorry ec, yes i'm an idiot, but i needed to know if you were there */
|
||||
}
|
||||
return result;
|
||||
ListBase *ec = pdInitEffectors(me,NULL);
|
||||
int result = 0;
|
||||
if (ec){
|
||||
result = 1;
|
||||
pdEndEffectors(ec); /* sorry ec, yes i'm an idiot, but i needed to know if you were there */
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1029,6 +1031,7 @@ static int query_internal_time(Object *me)
|
||||
if (me->softflag & OB_SB_GOAL) return 1;
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
/* --- dependancy information functions*/
|
||||
|
||||
/* +++ the aabb "force" section*/
|
||||
|
||||
@@ -194,7 +194,7 @@ void BLO_blendhandle_print_sizes(BlendHandle *bh, void *fp)
|
||||
buf[2]= buf[2]?buf[2]:' ';
|
||||
buf[3]= buf[3]?buf[3]:' ';
|
||||
|
||||
fprintf(fp, "['%.4s', '%s', %d, %ld ], \n", buf, name, bhead->nr, bhead->len+sizeof(BHead));
|
||||
fprintf(fp, "['%.4s', '%s', %d, %ld ], \n", buf, name, bhead->nr, (long)bhead->len+sizeof(BHead));
|
||||
}
|
||||
}
|
||||
fprintf(fp, "]\n");
|
||||
|
||||
@@ -2200,7 +2200,7 @@ static void do_write_image_or_movie(Render *re, Scene *scene, bMovieHandle *mh)
|
||||
rres.rect32= MEM_mapallocN(sizeof(int)*rres.rectx*rres.recty, "temp 32 bits rect");
|
||||
dofree = 1;
|
||||
}
|
||||
RE_ResultGet32(re, rres.rect32);
|
||||
RE_ResultGet32(re, (unsigned int *)rres.rect32);
|
||||
mh->append_movie(scene->r.cfra, rres.rect32, rres.rectx, rres.recty);
|
||||
if(dofree) {
|
||||
MEM_freeN(rres.rect32);
|
||||
@@ -2221,7 +2221,7 @@ static void do_write_image_or_movie(Render *re, Scene *scene, bMovieHandle *mh)
|
||||
int ok;
|
||||
|
||||
/* if not exists, BKE_write_ibuf makes one */
|
||||
ibuf->rect= rres.rect32;
|
||||
ibuf->rect= (unsigned int *)rres.rect32;
|
||||
ibuf->rect_float= rres.rectf;
|
||||
ibuf->zbuf_float= rres.rectz;
|
||||
|
||||
|
||||
@@ -778,7 +778,7 @@ static void reset_sky_speed(RenderPart *pa, RenderLayer *rl)
|
||||
static unsigned short *make_solid_mask(RenderPart *pa)
|
||||
{
|
||||
long *rd= pa->rectdaps;
|
||||
short *solidmask, *sp;
|
||||
unsigned short *solidmask, *sp;
|
||||
int x;
|
||||
|
||||
if(rd==NULL) return NULL;
|
||||
|
||||
@@ -178,7 +178,7 @@ static void compress_shadowbuf(ShadBuf *shb, int *rectz, int square)
|
||||
shsample->zbuf= MEM_mallocN( sizeof(unsigned long)*(size*size)/256, "initshadbuf2");
|
||||
shsample->cbuf= MEM_callocN( (size*size)/256, "initshadbuf3");
|
||||
|
||||
ztile= shsample->zbuf;
|
||||
ztile= (unsigned long *)shsample->zbuf;
|
||||
ctile= shsample->cbuf;
|
||||
|
||||
/* help buffer */
|
||||
@@ -433,7 +433,7 @@ void freeshadowbuf(LampRen *lar)
|
||||
v= (shb->size*shb->size)/256;
|
||||
|
||||
for(shsample= shb->buffers.first; shsample; shsample= shsample->next) {
|
||||
unsigned long *ztile= shsample->zbuf;
|
||||
long *ztile= shsample->zbuf;
|
||||
char *ctile= shsample->cbuf;
|
||||
|
||||
for(b=0; b<v; b++, ztile++, ctile++)
|
||||
|
||||
@@ -1877,8 +1877,8 @@ void RE_zbufferall_radio(struct RadView *vw, RNode **rg_elem, int rg_totelem, Re
|
||||
zspan.zofsy= -0.5f;
|
||||
|
||||
/* the buffers */
|
||||
zspan.rectz= vw->rectz;
|
||||
zspan.rectp= vw->rect;
|
||||
zspan.rectz= (int *)vw->rectz;
|
||||
zspan.rectp= (int *)vw->rect;
|
||||
fillrect(zspan.rectz, vw->rectx, vw->recty, 0x7FFFFFFF);
|
||||
fillrect(zspan.rectp, vw->rectx, vw->recty, 0xFFFFFF);
|
||||
|
||||
@@ -3151,7 +3151,7 @@ unsigned short *zbuffer_transp_shade(RenderPart *pa, RenderLayer *rl, float *pas
|
||||
add_transp_speed(rl, od, ssamp.shr[0].winspeed, pass[3], rdrect);
|
||||
}
|
||||
else {
|
||||
short filled, *sp= ztramask+od;
|
||||
short filled, *sp= (short *)(ztramask+od);
|
||||
|
||||
/* for each mask-sample we alpha-under colors. then in end it's added using filter */
|
||||
memset(samp_shr, 0, sizeof(ShadeResult)*R.osa);
|
||||
|
||||
@@ -210,7 +210,7 @@ void set_interface_font(char *str)
|
||||
|
||||
/* this test needed because fileselect callback can happen after disable AA fonts */
|
||||
if(U.transopts & USER_DOTRANSLATE) {
|
||||
if(FTF_SetFont(str, 0, U.fontsize)) {
|
||||
if(FTF_SetFont((unsigned char*)str, 0, U.fontsize)) {
|
||||
lang_setlanguage();
|
||||
|
||||
if(strlen(str) < FILE_MAXDIR) strcpy(U.fontname, str);
|
||||
@@ -218,7 +218,7 @@ void set_interface_font(char *str)
|
||||
}
|
||||
else {
|
||||
U.fontname[0]= 0;
|
||||
FTF_SetFont(datatoc_bfont_ttf, datatoc_bfont_ttf_size, U.fontsize);
|
||||
FTF_SetFont((unsigned char*)datatoc_bfont_ttf, datatoc_bfont_ttf_size, U.fontsize);
|
||||
G.ui_international = TRUE; // this case will switch to standard font
|
||||
okee("Invalid font selection - reverting to built-in font.");
|
||||
}
|
||||
@@ -239,10 +239,10 @@ void start_interface_font(void)
|
||||
if(U.fontsize && U.fontname[0] ) { // we have saved user settings + fontpath
|
||||
|
||||
// try loading font from U.fontname = full path to font in usersettings
|
||||
result = FTF_SetFont(U.fontname, 0, U.fontsize);
|
||||
result = FTF_SetFont((unsigned char*)U.fontname, 0, U.fontsize);
|
||||
}
|
||||
else if(U.fontsize) { // user settings, default
|
||||
result = FTF_SetFont(datatoc_bfont_ttf, datatoc_bfont_ttf_size, U.fontsize);
|
||||
result = FTF_SetFont((unsigned char*)datatoc_bfont_ttf, datatoc_bfont_ttf_size, U.fontsize);
|
||||
}
|
||||
|
||||
if(result==0) { // use default
|
||||
@@ -250,7 +250,7 @@ void start_interface_font(void)
|
||||
U.fontsize= 11;
|
||||
U.encoding= 0;
|
||||
U.fontname[0]= 0;
|
||||
result = FTF_SetFont(datatoc_bfont_ttf, datatoc_bfont_ttf_size, U.fontsize);
|
||||
result = FTF_SetFont((unsigned char*)datatoc_bfont_ttf, datatoc_bfont_ttf_size, U.fontsize);
|
||||
}
|
||||
|
||||
if(result) {
|
||||
|
||||
Reference in New Issue
Block a user