Bram,
the following patch fixes this gcc warning:

buffer.c: In Funktion »set_curbuf«:
buffer.c:1367:12: Warnung: Deklaration von »prevwin« überdeckt eine globale 
Deklaration [-Wshadow]
globals.h:535:15: Warnung: verdeckte Deklaration ist hier [-Wshadow]

It also moves the declaration of the win_T variable a little bit further 
down, since it is only needed in one single block.

diff --git a/src/buffer.c b/src/buffer.c
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -1363,9 +1363,6 @@
     int                action;
 {
     buf_T      *prevbuf;
-#ifdef FEAT_WINDOWS
-    win_T      *prevwin;
-#endif
     int                unload = (action == DOBUF_UNLOAD || action == DOBUF_DEL
                                                     || action == DOBUF_WIPE);
 
@@ -1406,7 +1403,7 @@
 #endif
        {
 #ifdef FEAT_WINDOWS
-           prevwin = curwin;
+           win_T       *previouswin = curwin;
 #endif
            if (prevbuf == curbuf)
                u_sync(FALSE);
@@ -1415,9 +1412,9 @@
                        && !P_HID(prevbuf)
                        && !bufIsChanged(prevbuf)) ? DOBUF_UNLOAD : 0, FALSE);
 #ifdef FEAT_WINDOWS
-           if (curwin != prevwin && win_valid(prevwin))
+           if (curwin != previouswin && win_valid(previouswin))
              /* autocommands changed curwin, Grr! */
-             curwin = prevwin;
+             curwin = previouswin;
 #endif
        }
     }

regards,
Christian

-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Raspunde prin e-mail lui