summaryrefslogtreecommitdiffhomepage
path: root/misc/examples/shape.c
diff options
context:
space:
mode:
authorTyge Løvset <[email protected]>2023-05-01 10:00:07 +0200
committerTyge Løvset <[email protected]>2023-05-01 10:02:12 +0200
commitf916573e2b3652d9b3f6fb82aadd5f2cfb3ce2fe (patch)
tree22283c2d74f2cac441ce04b3106e144f440b8137 /misc/examples/shape.c
parent49e7d9cc0a888b0b19aa4e737d55a2bc33bec824 (diff)
downloadSTC-modified-f916573e2b3652d9b3f6fb82aadd5f2cfb3ce2fe.tar.gz
STC-modified-f916573e2b3652d9b3f6fb82aadd5f2cfb3ce2fe.zip
Remove warnings when using -Wextra.
Diffstat (limited to 'misc/examples/shape.c')
-rw-r--r--misc/examples/shape.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/misc/examples/shape.c b/misc/examples/shape.c
index d7116039..22e993db 100644
--- a/misc/examples/shape.c
+++ b/misc/examples/shape.c
@@ -62,9 +62,9 @@ static void Triangle_draw(const Shape* shape)
{
const Triangle* self = DYN_CAST(Triangle, shape);
printf("Triangle : (%g,%g), (%g,%g), (%g,%g)\n",
- self->p[0].x, self->p[0].y,
- self->p[1].x, self->p[1].y,
- self->p[2].x, self->p[2].y);
+ (double)self->p[0].x, (double)self->p[0].y,
+ (double)self->p[1].x, (double)self->p[1].y,
+ (double)self->p[2].x, (double)self->p[2].y);
}
struct ShapeAPI Triangle_api = {
@@ -109,7 +109,7 @@ static void Polygon_draw(const Shape* shape)
const Polygon* self = DYN_CAST(Polygon, shape);
printf("Polygon :");
c_foreach (i, PointVec, self->points)
- printf(" (%g,%g)", i.ref->x, i.ref->y);
+ printf(" (%g,%g)", (double)i.ref->x, (double)i.ref->y);
puts("");
}