aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2016-07-13 22:28:35 +0200
committerMattias Andrée <maandree@kth.se>2016-07-13 22:28:35 +0200
commit0cc25bd8f272f234c56c38817464b9a1f4650a34 (patch)
tree6f7f2597fa21282fd22bcf1e646d4276f9091056 /src
parentSuppress warnings (diff)
downloadlibclut-0cc25bd8f272f234c56c38817464b9a1f4650a34.tar.gz
libclut-0cc25bd8f272f234c56c38817464b9a1f4650a34.tar.bz2
libclut-0cc25bd8f272f234c56c38817464b9a1f4650a34.tar.xz
Suppress warning
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'src')
-rw-r--r--src/libclut.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libclut.h b/src/libclut.h
index 3805f5d..eee13f1 100644
--- a/src/libclut.h
+++ b/src/libclut.h
@@ -547,24 +547,24 @@ static inline int libclut_0__(double x) { return libclut_eq__(x, 0); }
do \
{ \
size_t i__; \
- double m__; \
+ double m__, max__ = (double)(max); \
if (r) \
{ \
m__ = (double)((clut)->red_size - 1); \
for (i__ = 0; i__ < (clut)->red_size; i__++) \
- (clut)->red[i__] = (type)(((double)i__ / m__) * (max)); \
+ (clut)->red[i__] = (type)(((double)i__ / m__) * max__); \
} \
if (g) \
{ \
m__ = (double)((clut)->green_size - 1); \
for (i__ = 0; i__ < (clut)->green_size; i__++) \
- (clut)->green[i__] = (type)(((double)i__ / m__) * (max)); \
+ (clut)->green[i__] = (type)(((double)i__ / m__) * max__); \
} \
if (b) \
{ \
m__ = (double)((clut)->blue_size - 1); \
for (i__ = 0; i__ < (clut)->blue_size; i__++) \
- (clut)->blue[i__] = (type)(((double)i__ / m__) * (max)); \
+ (clut)->blue[i__] = (type)(((double)i__ / m__) * max__); \
} \
} \
while (0)