Routine purge of compiler warnings. Yet again, they were mostly uninitialised vars.

This commit is contained in:
2007-10-29 05:59:26 +00:00
parent 2c5287df04
commit e448f20db5
5 changed files with 15 additions and 5 deletions

View File

@@ -892,7 +892,7 @@ void BKE_stamp_buf(unsigned char *rect, float *rectf, int width, int height)
{
struct StampData stamp_data;
int x,y;
int x=1,y=1;
int font_height;
int text_width;
int text_pad;

View File

@@ -1547,7 +1547,7 @@ int sb_detect_vertex_collisionCached(float opco[3], float facenormal[3], float *
float force[3], unsigned int par_layer,struct Object *vertexowner,
float time,float vel[3], float *intrusion)
{
Object *ob;
Object *ob= NULL;
GHash *hash;
GHashIterator *ihash;
float nv1[3], nv2[3], nv3[3], nv4[3], edge1[3], edge2[3],d_nvect[3], dv1[3],ve[3],avel[3],
@@ -1555,7 +1555,7 @@ int sb_detect_vertex_collisionCached(float opco[3], float facenormal[3], float *
outerforceaccu[3],innerforceaccu[3],
facedist,n_mag,force_mag_norm,minx,miny,minz,maxx,maxy,maxz,
innerfacethickness = -0.5f, outerfacethickness = 0.2f,
ee = 5.0f, ff = 0.1f, fa;
ee = 5.0f, ff = 0.1f, fa=1;
int a, deflected=0, cavel=0,ci=0;
/* init */
*intrusion = 0.0f;

View File

@@ -183,8 +183,12 @@ void bilinear_interpolation(ImBuf *in, ImBuf *out, float u, float v, int xout, i
if (do_rect)
outI=(unsigned char *)out->rect + out->x * yout * 4 + 4*xout;
else
outI= NULL;
if (do_float)
outF=(float *)out->rect_float + out->x * yout * 4 + 4*xout;
else
outF= NULL;
if (do_float) {
// sample including outside of edges of image
@@ -254,8 +258,12 @@ void neareast_interpolation(ImBuf *in, ImBuf *out, float u, float v,int xout, in
if (do_rect)
outI=(unsigned char *)out->rect + out->x * yout * 4 + 4*xout;
else
outI= NULL;
if (do_float)
outF=(float *)out->rect_float + out->x * yout * 4 + 4*xout;
else
outF= NULL;
// sample area entirely outside image?
if (x1<0 || x1>in->x-1 || y1<0 || y1>in->y-1) return;

View File

@@ -545,8 +545,8 @@ void buf_rectfill_area(unsigned char *rect, float *rectf, int width, int height,
if (rect) {
unsigned char *pixel;
unsigned char chr, chg, chb;
float fr, fg, fb;
unsigned char chr=0, chg=0, chb=0;
float fr=0, fg=0, fb=0;
if (a == 1.0) {
chr = FTOCHAR(col[0]);

View File

@@ -806,6 +806,7 @@ static void QMC_sampleHemi(float *vec, QMCSampler *qsa, int thread, int num)
vec[2] = 1.f - s[1]*s[1];
}
#if 0 /* currently not used */
/* cosine weighted hemisphere sampling */
static void QMC_sampleHemiCosine(float *vec, QMCSampler *qsa, int thread, int num)
{
@@ -822,6 +823,7 @@ static void QMC_sampleHemiCosine(float *vec, QMCSampler *qsa, int thread, int nu
vec[2] = 1.f - s[1]*s[1];
}
#endif
/* called from convertBlenderScene.c */
/* samples don't change per pixel, so build the samples in advance for efficiency */