Hi

Attached patch fixes the following compilation warnings with
clang-3.5 (trunk in svn) when compiling vim tiny 7.4.183:

ex_cmds.c:4102:14: warning: variable 'bigness' is used uninitialized
whenever 'if' condition is false
      [-Wsometimes-uninitialized]
    else if (firstwin == lastwin)
             ^~~~~~~~~~~~~~~~~~~
./globals.h:552:19: note: expanded from macro 'firstwin'
# define firstwin curwin
                  ^
ex_cmds.c:4108:9: note: uninitialized use occurs here
    if (bigness < 1)
        ^~~~~~~
ex_cmds.c:4102:10: note: remove the 'if' if its condition is always true
    else if (firstwin == lastwin)
         ^~~~~~~~~~~~~~~~~~~~~~~~
ex_cmds.c:4091:17: note: initialize the variable 'bigness' to silence
this warning
    int         bigness;
                       ^
                        = 0

Regards
Dominique

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.
diff -r 7ea91c82839f src/ex_cmds.c
--- a/src/ex_cmds.c	Sat Feb 15 19:47:51 2014 +0100
+++ b/src/ex_cmds.c	Sat Feb 15 23:30:26 2014 +0100
@@ -4099,11 +4099,14 @@
      * 'scroll' */
     if (eap->forceit)
 	bigness = curwin->w_height;
+#ifdef FEAT_WINDOWS
     else if (firstwin == lastwin)
 	bigness = curwin->w_p_scr * 2;
-#ifdef FEAT_WINDOWS
     else
 	bigness = curwin->w_height - 3;
+#else
+    else
+	bigness = curwin->w_p_scr * 2;
 #endif
     if (bigness < 1)
 	bigness = 1;

Raspunde prin e-mail lui