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 /source/blender/imbuf | |
parent | 2c5287df0442f1c9cb1a9f234edcc56496229faf (diff) |
Routine purge of compiler warnings. Yet again, they were mostly uninitialised vars.
Diffstat (limited to 'source/blender/imbuf')
-rw-r--r-- | source/blender/imbuf/intern/imageprocess.c | 8 | ||||
-rw-r--r-- | source/blender/imbuf/intern/rectop.c | 4 |
2 files changed, 10 insertions, 2 deletions
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]); |