I noticed the same warning building with Cygwin, plus a "clobber" warning in 
main.c. 

I'm a little obsessive about "no warnings," so my solution was also to 
intialize did_free to FALSE, as well as marking the "previous_got_int" variable 
as volatile in main.c.




main.c: In function ‘main_loop’:
main.c:1054:10: warning: variable ‘previous_got_int’ might be clobbered by 
‘longjmp’ or ‘vfork’ [-Wclobbered]
     int  previous_got_int = FALSE; /* "got_int" was TRUE */
          ^


and

eval.c: In function ‘garbage_collect’:
eval.c:6934:5: warning: ‘did_free’ may be used uninitialized in this function 
[-Wmaybe-uninitialized]
     return did_free;
     ^

Patch:

diff -r b0a227941705 src/eval.c
--- a/src/eval.c        Tue Feb 03 19:13:34 2015 +0100
+++ b/src/eval.c        Wed Feb 04 11:50:26 2015 -0600
@@ -6815,7 +6815,7 @@
     win_T      *wp;
     int                i;
     funccall_T *fc, **pfc;
-    int                did_free;
+    int                did_free = FALSE;
     int                did_free_funccal = FALSE;
 #ifdef FEAT_WINDOWS
     tabpage_T  *tp;
diff -r b0a227941705 src/main.c
--- a/src/main.c        Tue Feb 03 19:13:34 2015 +0100
+++ b/src/main.c        Wed Feb 04 11:50:26 2015 -0600
@@ -1051,7 +1051,7 @@
     int                noexmode;   /* TRUE when return on entering Ex mode */
 {
     oparg_T    oa;                             /* operator arguments */
-    int                previous_got_int = FALSE;       /* "got_int" was TRUE */
+    volatile int               previous_got_int = FALSE;       /* "got_int" 
was TRUE */
 #ifdef FEAT_CONCEAL
     linenr_T   conceal_old_cursor_line = 0;
     linenr_T   conceal_new_cursor_line = 0;



On Wednesday, February 4, 2015 at 6:48:45 AM UTC-6, Tony Mechelynck wrote:
> Sorry if this has already been reported, I'm very far behind reading mail due 
> to computer slowness (computer won't stay up unless I set "Fan: silent (but 
> may reduce CPU performance)" in the BIOS, and this makes it *very* slow 
> indeed).
> 
> At 7.4.617 (but after updating the Mercurial source up several patchlevels 
> without compiling each of them), in Huge Linux64 build but not in Tiny build, 
> eval.c gets the following warning:
> 
> eval.c: In function ‘garbage_collect’:
> eval.c:6934:5: warning: ‘did_free’ may be used uninitialized in this function 
> [-Wmaybe-uninitialized]
>       return did_free;
>       ^
> 
> This does not prevent generation of an object and later of an executable.
> 
> 
> Best regards,
> Tony.

-- 
-- 
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/d/optout.
diff -r b0a227941705 src/eval.c
--- a/src/eval.c        Tue Feb 03 19:13:34 2015 +0100
+++ b/src/eval.c        Wed Feb 04 11:50:26 2015 -0600
@@ -6815,7 +6815,7 @@
     win_T      *wp;
     int                i;
     funccall_T *fc, **pfc;
-    int                did_free;
+    int                did_free = FALSE;
     int                did_free_funccal = FALSE;
 #ifdef FEAT_WINDOWS
     tabpage_T  *tp;
diff -r b0a227941705 src/main.c
--- a/src/main.c        Tue Feb 03 19:13:34 2015 +0100
+++ b/src/main.c        Wed Feb 04 11:50:26 2015 -0600
@@ -1051,7 +1051,7 @@
     int                noexmode;   /* TRUE when return on entering Ex mode */
 {
     oparg_T    oa;                             /* operator arguments */
-    int                previous_got_int = FALSE;       /* "got_int" was TRUE */
+    volatile int               previous_got_int = FALSE;       /* "got_int" was TRUE */
 #ifdef FEAT_CONCEAL
     linenr_T   conceal_old_cursor_line = 0;
     linenr_T   conceal_new_cursor_line = 0;

Raspunde prin e-mail lui