aboutsummaryrefslogtreecommitdiffstats
path: root/src/blind-hexagon-tessellation.c
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2017-07-15 01:04:14 +0200
committerMattias Andrée <maandree@kth.se>2017-07-15 01:04:14 +0200
commitf3cde9060c57320c9ed7a9b4bcb494bd411fb1f4 (patch)
tree41a1a50970c7875038e25b6a0a632e23b1ce6001 /src/blind-hexagon-tessellation.c
parentFix blind-{cross,dot,quaternion}-product and blind-vector-projection (diff)
downloadblind-f3cde9060c57320c9ed7a9b4bcb494bd411fb1f4.tar.gz
blind-f3cde9060c57320c9ed7a9b4bcb494bd411fb1f4.tar.bz2
blind-f3cde9060c57320c9ed7a9b4bcb494bd411fb1f4.tar.xz
Fix warnings
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'src/blind-hexagon-tessellation.c')
-rw-r--r--src/blind-hexagon-tessellation.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/blind-hexagon-tessellation.c b/src/blind-hexagon-tessellation.c
index fc538a5..e282218 100644
--- a/src/blind-hexagon-tessellation.c
+++ b/src/blind-hexagon-tessellation.c
@@ -57,7 +57,7 @@ main(int argc, char *argv[])
eprintf("pixel format %s is not supported, try xyza\n", pixfmt);
strcpy(stream.pixfmt, pixfmt);
- stream.width = (size_t)(diameter * sqrt(3.));
+ stream.width = (size_t)((double)diameter * sqrt(3.));
stream.height = diameter * 3 / 2;
fprint_stream_head(stdout, &stream);
efflush(stdout, "<stdout>");
@@ -100,7 +100,7 @@ main(int argc, char *argv[])
} else {
k = (stream.width <= x * 4 && x * 4 < stream.width * 3) + 2;
}
- ewriteall(STDOUT_FILENO, colours + k * pixwidth, pixwidth, "<stdout>");
+ ewriteall(STDOUT_FILENO, colours + (size_t)k * pixwidth, pixwidth, "<stdout>");
}
}