diff options
author | Joshua Leung <aligorith@gmail.com> | 2007-10-29 08:59:26 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2007-10-29 08:59:26 +0300 |
commit | e448f20db5e3d283f25898d07f64200f1acb8b3f (patch) | |
tree | 5951a94e237f659d9903c44d949572b6742b2690 | |
parent | 2c5287df0442f1c9cb1a9f234edcc56496229faf (diff) |
Routine purge of compiler warnings. Yet again, they were mostly uninitialised vars.
-rw-r--r-- | source/blender/blenkernel/intern/image.c | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/softbody.c | 4 | ||||
-rw-r--r-- | source/blender/imbuf/intern/imageprocess.c | 8 | ||||
-rw-r--r-- | source/blender/imbuf/intern/rectop.c | 4 | ||||
-rw-r--r-- | source/blender/render/intern/source/rayshade.c | 2 |
5 files changed, 15 insertions, 5 deletions
diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c index bdf081496e5..d4b53e43b65 100644 --- a/source/blender/blenkernel/intern/image.c +++ b/source/blender/blenkernel/intern/image.c @@ -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; diff --git a/source/blender/blenkernel/intern/softbody.c b/source/blender/blenkernel/intern/softbody.c index c62f59106a3..19dcee676cb 100644 --- a/source/blender/blenkernel/intern/softbody.c +++ b/source/blender/blenkernel/intern/softbody.c @@ -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; diff --git a/source/blender/imbuf/intern/imageprocess.c b/source/blender/imbuf/intern/imageprocess.c index d3f75c9d64a..54e0ec94672 100644 --- a/source/blender/imbuf/intern/imageprocess.c +++ b/source/blender/imbuf/intern/imageprocess.c @@ -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; diff --git a/source/blender/imbuf/intern/rectop.c b/source/blender/imbuf/intern/rectop.c index fde0b2b3623..63de3bd2355 100644 --- a/source/blender/imbuf/intern/rectop.c +++ b/source/blender/imbuf/intern/rectop.c @@ -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]); diff --git a/source/blender/render/intern/source/rayshade.c b/source/blender/render/intern/source/rayshade.c index 3a859b083ed..49448f2d727 100644 --- a/source/blender/render/intern/source/rayshade.c +++ b/source/blender/render/intern/source/rayshade.c @@ -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 */ |