In function 'IceOpenConnection':  gcc give the following warning:
 connect.c:106:11: warning: declaration of 'iceConn' shadows a previous local  
[-Wshadow]
fixed by renaming 2. iceConn to iConn (and all its uses)

Signed-off-by: Walter Harms <[email protected]>



---
 src/connect.c | 34 +++++++++++++++++-----------------
 1 file changed, 17 insertions(+), 17 deletions(-)

diff --git a/src/connect.c b/src/connect.c
index 276a356..5ab5498 100644
--- a/src/connect.c
+++ b/src/connect.c
@@ -103,11 +103,11 @@ IceOpenConnection (
                 * OK, we found a connection.  Make sure we can reuse it.
                 */

-               IceConn iceConn = _IceConnectionObjs[i];
+               IceConn iConn = _IceConnectionObjs[i];

-               if (iceConn->want_to_close || iceConn->free_asap ||
-                   (context && iceConn->context &&
-                    iceConn->context != context))
+               if (iConn->want_to_close || iConn->free_asap ||
+                   (context && iConn->context &&
+                    iConn->context != context))
                {
                    /* force a new connection to be created */
                    break;
@@ -115,20 +115,20 @@ IceOpenConnection (

                if (majorOpcodeCheck)
                {
-                   for (j = iceConn->his_min_opcode;
-                       j <= iceConn->his_max_opcode; j++)
+                   for (j = iConn->his_min_opcode;
+                       j <= iConn->his_max_opcode; j++)
                    {
-                       if (iceConn->process_msg_info[
-                           j - iceConn->his_min_opcode].in_use &&
-                           iceConn->process_msg_info[
-                           j - iceConn->his_min_opcode].my_opcode ==
+                       if (iConn->process_msg_info[
+                           j - iConn->his_min_opcode].in_use &&
+                           iConn->process_msg_info[
+                           j - iConn->his_min_opcode].my_opcode ==
                            majorOpcodeCheck)
                            break;
                    }

-                   if (j <= iceConn->his_max_opcode ||
-                       (iceConn->protosetup_to_you &&
-                       iceConn->protosetup_to_you->my_opcode ==
+                   if (j <= iConn->his_max_opcode ||
+                       (iConn->protosetup_to_you &&
+                       iConn->protosetup_to_you->my_opcode ==
                        majorOpcodeCheck))
                    {
                        /* force a new connection to be created */
@@ -136,10 +136,10 @@ IceOpenConnection (
                    }
                }

-               iceConn->open_ref_count++;
-               if (context && !iceConn->context)
-                   iceConn->context = context;
-               return (iceConn);
+               iConn->open_ref_count++;
+               if (context && !iConn->context)
+                   iConn->context = context;
+               return (iConn);
            }
        }
     }
-- 
2.1.4

_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to