diff options
-rw-r--r-- | src/detector.c | 4 | ||||
-rw-r--r-- | src/utils.c | 2 |
2 files changed, 3 insertions, 3 deletions
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; x<width; x++ ) { for ( y=0; y<height; y++ ) { - data[x + width*y] = tmp[x + width*y]; + data[x + width*y] = (uint16_t)tmp[x + width*y]; } } @@ -163,7 +163,7 @@ void record_image(struct image *image) double complex val; val = image->sfacs[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<n; i++ ) s[i] = '='; for ( i=n; i<80; i++ ) s[i] = '.'; |