render: make compiler happy; make sure 'cell_count' has been initialized

Compiler, in release builds, complains about 'cell_count' "may be used
uninitialized". This isn't true, as it is initialized in every
possible switch case below.

But, make the compiler happy and zero-initialize it before the switch
statement.
This commit is contained in:
Daniel Eklöf 2020-07-29 07:25:56 +02:00
parent d361951dd5
commit c1653c7237
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

View file

@ -1360,7 +1360,7 @@ render_scrollback_position(struct terminal *term)
wchar_t _text[64];
const wchar_t *text = _text;
int cell_count;
int cell_count = 0;
/* *What* to render */
switch (term->conf->scrollback.indicator.format) {