Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 1 addition & 9 deletions run.c
Original file line number Diff line number Diff line change
Expand Up @@ -1978,7 +1978,6 @@ static char *nawk_convert(const char *s, int (*fun_c)(int),
size_t n = 0;
wchar_t wc;
const size_t sz = awk_mb_cur_max;
int unused;

if (sz == 1) {
buf = tostring(s);
Expand All @@ -1992,14 +1991,7 @@ static char *nawk_convert(const char *s, int (*fun_c)(int),
buf = tostringN(s, strlen(s) * sz + 1);

(void) mbtowc(NULL, NULL, 0); /* reset internal state */
/*
* Reset internal state here too.
* Assign result to avoid a compiler warning. (Casting to void
* doesn't work.)
* Increment said variable to avoid a different warning.
*/
unused = wctomb(NULL, L'\0');
unused++;
(void) wctomb(NULL, L'\0'); /* reset internal state */

ps = s;
pbuf = buf;
Expand Down