aboutsummaryrefslogtreecommitdiff
path: root/src/multihistogram.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2018-11-01 10:33:17 +0100
committerThomas White <taw@physics.org>2018-11-02 14:24:55 +0100
commited94e880540cf1cbc3903ec5ec1489e2b67ac0ca (patch)
treec45cf8f2c76de85ba1989b4db3ec9ba03c7e8c42 /src/multihistogram.c
parente1d6bf0cbd867573441d1c48dbbfed627b27af11 (diff)
Fix some warnings from static analyser
Diffstat (limited to 'src/multihistogram.c')
-rw-r--r--src/multihistogram.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/multihistogram.c b/src/multihistogram.c
index cf2b8c2b..ba1f7e76 100644
--- a/src/multihistogram.c
+++ b/src/multihistogram.c
@@ -93,7 +93,7 @@ void multihistogram_free(MultiHistogram *hi)
}
-void multihistogram_add_value(MultiHistogram *hi, double val, int cat)
+void multihistogram_add_value(MultiHistogram *hi, double val, unsigned int cat)
{
int i, j;
@@ -104,7 +104,7 @@ void multihistogram_add_value(MultiHistogram *hi, double val, int cat)
if ( j >= hi->n_bins ) j = hi->n_bins - 1;
for ( i=0; i<32; i++ ) {
- if ( cat & 1<<i ) hi->bins[i][j]++;
+ if ( cat & (unsigned)1<<i ) hi->bins[i][j]++;
}
}