aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2021-08-06 20:29:33 +0000
committerDaniel Eklöf <daniel@ekloef.se>2021-08-06 20:29:33 +0000
commit22b280b3558710e622c76723e7bb0ca6783807a6 (patch)
tree6aac38d079efb713cbe099c86aef911c81443839
parentbox-drawing: re-align sextants and wedges (diff)
box-drawing: fix compiler warning
../../box-drawing.c: In function 'box_drawing': ../../box-drawing.c:2774:13: error: 'y1' may be used uninitialized in this function [-Werror=maybe-uninitialized] 2774 | int y0, y1; | ^~ ../../box-drawing.c:2774:9: error: 'y0' may be used uninitialized in this function [-Werror=maybe-uninitialized] 2774 | int y0, y1; | ^~
-rw-r--r--box-drawing.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/box-drawing.c b/box-drawing.c
index 54a966a1..62716106 100644
--- a/box-drawing.c
+++ b/box-drawing.c
@@ -2771,7 +2771,7 @@ box_drawing(const struct terminal *term, wchar_t wc)
buf.x_halfs[0] = round(width / 2.); /* Endpoint first half */
buf.x_halfs[1] = width / 2; /* Startpoint second half */
- int y0, y1;
+ int y0 = 0, y1 = 0;
switch (height % 3) {
case 0:
y0 = height / 3;