[PATCH 10/19] more: fix shadow declaration

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxx>
---
 text-utils/more.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/text-utils/more.c b/text-utils/more.c
index 4cf090f..5e41a54 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--)
-- 
1.7.11.3

--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux