diff options
author | Behdad Esfahbod <behdad@behdad.org> | 2006-12-16 18:16:46 -0500 |
---|---|---|
committer | Behdad Esfahbod <behdad@behdad.org> | 2006-12-16 18:16:46 -0500 |
commit | 8f2ad0affd4fe4821992e87487bc2737e9c538e5 (patch) | |
tree | 80af511a31694b9318f8db6edf605f61036b81bd /test/pdiff | |
parent | be6edd64a3f45f7fb33f7d57b71b1ef467b474e1 (diff) |
[pdiff] Fix compiler warnings, that were causing crashes
Diffstat (limited to 'test/pdiff')
-rw-r--r-- | test/pdiff/pdiff.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/test/pdiff/pdiff.c b/test/pdiff/pdiff.c index 1b73e796..b117d797 100644 --- a/test/pdiff/pdiff.c +++ b/test/pdiff/pdiff.c @@ -196,6 +196,8 @@ xmalloc (size_t size) fprintf (stderr, "Out of memory.\n"); exit (1); } + + return buf; } int @@ -288,6 +290,7 @@ pdiff_compare (cairo_surface_t *surface_a, float F_mask[MAX_PYR_LEVELS - 2]; float factor; float delta; + float adapt; bool pass; float sum_contrast = 0; for (i = 0; i < MAX_PYR_LEVELS - 2; i++) { @@ -302,7 +305,7 @@ pdiff_compare (cairo_surface_t *surface_a, sum_contrast += contrast[i]; } if (sum_contrast < 1e-5) sum_contrast = 1e-5f; - float adapt = lpyramid_get_value(la,x,y,adaptation_level) + lpyramid_get_value(lb,x,y,adaptation_level); + adapt = lpyramid_get_value(la,x,y,adaptation_level) + lpyramid_get_value(lb,x,y,adaptation_level); adapt *= 0.5f; if (adapt < 1e-5) adapt = 1e-5f; for (i = 0; i < MAX_PYR_LEVELS - 2; i++) { |