Hi

Attached patch fixes the following compilation
warnings in vim-7.4.1273 with gcc-.5.2.1 on
Ubuntu MATE 15.10 on raspberry PI2:

gcc -c -I. -Iproto -DHAVE_CONFIG_H     -g -Wall -O3 -Wextra
-Wmissing-prototypes -Wunreachable-code -U_FORTIFY_SOURCE
-D_FORTIFY_SOURCE=1       -o objects/ex_cmds2.o ex_cmds2.c
eval.c: In function ‘f_type’:
eval.c:19666:26: warning: ‘n’ may be used uninitialized in this
function [-Wmaybe-uninitialized]
     rettv->vval.v_number = n;
                          ^
eval.c: In function ‘f_empty’:
eval.c:10561:26: warning: ‘n’ may be used uninitialized in this
function [-Wmaybe-uninitialized]
     rettv->vval.v_number = n;
                          ^
eval.c: In function ‘write_viminfo_varlist’:
eval.c:24654:3: warning: ‘s’ may be used uninitialized in this
function [-Wmaybe-uninitialized]
   fprintf(fp, "!%s\t%s\t", this_var->di_key, s);
   ^

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/d/optout.
diff --git a/src/eval.c b/src/eval.c
index a50fdbf..cd00ccc 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -10552,7 +10552,7 @@ f_empty(typval_T *argvars, typval_T *rettv)
 	    n = argvars[0].vval.v_number != VVAL_TRUE;
 	    break;
 
-	case VAR_UNKNOWN:
+	default:
 	    EMSG2(_(e_intern2), "f_empty(UNKNOWN)");
 	    n = TRUE;
 	    break;
@@ -19658,7 +19658,7 @@ f_type(typval_T *argvars, typval_T *rettv)
 	     else
 		 n = 7;
 	     break;
-	case VAR_UNKNOWN:
+	default:
 	     EMSG2(_(e_intern2), "f_type(UNKNOWN)");
 	     n = -1;
 	     break;
@@ -24647,8 +24647,7 @@ write_viminfo_varlist(FILE *fp)
 		    case VAR_LIST:   s = "LIS"; break;
 		    case VAR_SPECIAL: s = "XPL"; break;
 
-		    case VAR_UNKNOWN:
-		    case VAR_FUNC:
+		    default: /* VAR_FUNC, VAR_UNKNOWN */
 				     continue;
 		}
 		fprintf(fp, "!%s\t%s\t", this_var->di_key, s);

Raspunde prin e-mail lui