From 377810c338e2f84d0ebc4b44086eb8ecf5f6741d Mon Sep 17 00:00:00 2001 From: Thomas White Date: Thu, 19 Nov 2009 16:42:29 +0100 Subject: Add explicit casts when converting types --- src/detector.c | 4 ++-- src/utils.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/detector.c b/src/detector.c index 6ca5e8e7..8467a322 100644 --- a/src/detector.c +++ b/src/detector.c @@ -125,7 +125,7 @@ static uint16_t *bloom(double *hdr_in, int width, int height) /* Turn into integer array of counts */ for ( x=0; xsfacs[x + image->width*y]; - intensity = val * conj(val); + intensity = (double)(val * conj(val)); /* What solid angle is subtended by this pixel? */ sa = sa_per_pixel * cos(image->twotheta[x + image->width*y]); diff --git a/src/utils.c b/src/utils.c index 2868ef08..e33defd4 100644 --- a/src/utils.c +++ b/src/utils.c @@ -166,7 +166,7 @@ void progress_bar(int val, int total) char s[1024]; frac = (double)val/total; - n = frac*80; + n = (int)(frac*80); for ( i=0; i