diff options
| author | Mattias Andrée <maandree@kth.se> | 2017-07-15 01:04:14 +0200 |
|---|---|---|
| committer | Mattias Andrée <maandree@kth.se> | 2017-07-15 01:04:14 +0200 |
| commit | f3cde9060c57320c9ed7a9b4bcb494bd411fb1f4 (patch) | |
| tree | 41a1a50970c7875038e25b6a0a632e23b1ce6001 /src/blind-hexagon-tessellation.c | |
| parent | Fix blind-{cross,dot,quaternion}-product and blind-vector-projection (diff) | |
| download | blind-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.c | 4 |
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>"); } } |
