From f3cde9060c57320c9ed7a9b4bcb494bd411fb1f4 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Sat, 15 Jul 2017 01:04:14 +0200 Subject: Fix warnings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/blind-hexagon-tessellation.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/blind-hexagon-tessellation.c') 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, ""); @@ -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, ""); + ewriteall(STDOUT_FILENO, colours + (size_t)k * pixwidth, pixwidth, ""); } } -- cgit v1.2.3-70-g09d2