[PATCH libX11 1/3] fix more shadow warning

walter harms wharms at bfs.de
Mon Apr 11 16:22:38 UTC 2016



Signed-off-by: walter harms <wharms at bfs.de>
---

fix an other shadow warning by renaming the var

---
 modules/im/ximcp/imCallbk.c | 6 +++---
 modules/im/ximcp/imLcLkup.c | 6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/modules/im/ximcp/imCallbk.c b/modules/im/ximcp/imCallbk.c
index 4e091d8..ead0806 100644
--- a/modules/im/ximcp/imCallbk.c
+++ b/modules/im/ximcp/imCallbk.c
@@ -624,16 +624,16 @@ _XimPreeditCaretCallback(Xim im,
      */
     {
 	CARD8 buf[sz_ximPacketHeader + sz_ximPreeditCaretReply];
-	INT16 len = sz_XIMID + sz_XICID + sz_ximPreeditCaretReply;
+	INT16 rlen = sz_XIMID + sz_XICID + sz_ximPreeditCaretReply;
 	int p;

-	_XimSetHeader((XPointer)buf, XIM_PREEDIT_CARET_REPLY, 0, &len);
+	_XimSetHeader((XPointer)buf, XIM_PREEDIT_CARET_REPLY, 0, &rlen);
 	p = XIM_HEADER_SIZE;
 	*(CARD16*)&buf[p] = (CARD16)im->private.proto.imid; p += sz_CARD16;
 	*(CARD16*)&buf[p] = (CARD16)ic->private.proto.icid; p += sz_CARD16;
 	*(CARD32*)&buf[p] = (CARD32)cbs.position;

-	if (!(_XimWriteData(im, len, buf))) {
+	if (!(_XimWriteData(im, rlen, buf))) {
 	    return XimCbError;
 	}
 	_XimFlushData(im);
diff --git a/modules/im/ximcp/imLcLkup.c b/modules/im/ximcp/imLcLkup.c
index 9e4aec3..56dba96 100644
--- a/modules/im/ximcp/imLcLkup.c
+++ b/modules/im/ximcp/imLcLkup.c
@@ -61,8 +61,8 @@ _XimLocalMbLookupString(XIC xic, XKeyEvent *ev, char *buffer, int bytes,
 	    ||(ic->private.local.brl_committed != 0))) {
 	if (ic->private.local.brl_committed != 0) { /* Braille Event */
 	    unsigned char pattern = ic->private.local.brl_committed;
-	    char mb[XLC_PUBLIC(ic->core.im->core.lcd, mb_cur_max)];
-	    ret = _Xlcwctomb(ic->core.im->core.lcd, mb, BRL_UC_ROW | pattern);
+	    char mb2[XLC_PUBLIC(ic->core.im->core.lcd, mb_cur_max)];
+	    ret = _Xlcwctomb(ic->core.im->core.lcd, mb2, BRL_UC_ROW | pattern);
 	    if(ret > bytes) {
 		if(status) *status = XBufferOverflow;
 		return(ret);
@@ -74,7 +74,7 @@ _XimLocalMbLookupString(XIC xic, XKeyEvent *ev, char *buffer, int bytes,
 		} else {
 		    if(status) *status = XLookupChars;
 		}
-		memcpy(buffer, mb, ret);
+		memcpy(buffer, mb2, ret);
 	    } else {
 		if(keysym) {
 		    if(status) *status = XLookupKeySym;
-- 
2.1.4



More information about the xorg-devel mailing list