mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-04-01 07:15:32 -04:00
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;
| ^~
This commit is contained in:
parent
130cf791e9
commit
22b280b355
1 changed files with 1 additions and 1 deletions
|
|
@ -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[0] = round(width / 2.); /* Endpoint first half */
|
||||||
buf.x_halfs[1] = width / 2; /* Startpoint second half */
|
buf.x_halfs[1] = width / 2; /* Startpoint second half */
|
||||||
|
|
||||||
int y0, y1;
|
int y0 = 0, y1 = 0;
|
||||||
switch (height % 3) {
|
switch (height % 3) {
|
||||||
case 0:
|
case 0:
|
||||||
y0 = height / 3;
|
y0 = height / 3;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue