diff options
author | Sami Kerola | 2012-07-25 21:15:31 +0200 |
---|---|---|
committer | Karel Zak | 2012-07-26 13:51:18 +0200 |
commit | 9c35d79ad8943acdd594564f03a5c413da38e559 (patch) | |
tree | 24bc25073666006881e435007f731d5f4a2de43d /text-utils | |
parent | setterm: fix shadow declaration (diff) | |
download | kernel-qcow2-util-linux-9c35d79ad8943acdd594564f03a5c413da38e559.tar.gz kernel-qcow2-util-linux-9c35d79ad8943acdd594564f03a5c413da38e559.tar.xz kernel-qcow2-util-linux-9c35d79ad8943acdd594564f03a5c413da38e559.zip |
more: fix shadow declaration
text-utils/more.c:1123:13: warning: declaration of 'state' shadows a previous local [-Wshadow]
text-utils/more.c:1095:18: warning: shadowed declaration is here [-Wshadow]
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Diffstat (limited to 'text-utils')
-rw-r--r-- | text-utils/more.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/text-utils/more.c b/text-utils/more.c index 4cf090fd6..5e41a540a 100644 --- a/text-utils/more.c +++ b/text-utils/more.c @@ -1120,10 +1120,10 @@ void prbuf (register char *s, register int n) { wchar_t wc; size_t mblength; - mbstate_t state; - memset (&state, '\0', sizeof (mbstate_t)); + mbstate_t mbstate; + memset (&mbstate, '\0', sizeof (mbstate_t)); s--; n++; - mblength = mbrtowc (&wc, s, n, &state); + mblength = mbrtowc (&wc, s, n, &mbstate); if (mblength == (size_t) -2 || mblength == (size_t) -1) mblength = 1; while (mblength--) |