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:
Daniel Eklöf 2021-08-06 22:29:33 +02:00
parent 130cf791e9
commit 22b280b355
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

View file

@ -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;