eval: Silence warning on localvar_stop

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The variable localvar_stop is set iff vlocal is true.  gcc doesn't
get this so we need to silence the warning with uninitialized_var.

Signed-off-by: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>

diff --git a/src/eval.c b/src/eval.c
index c300d0c..ebec829 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -54,6 +54,7 @@
 #include "redir.h"
 #include "input.h"
 #include "output.h"
+#include "system.h"
 #include "trap.h"
 #include "var.h"
 #include "memalloc.h"
@@ -714,7 +715,7 @@ evalcommand(union node *cmd, int flags, struct backcmd *backcmd)
 evalcommand(union node *cmd, int flags)
 #endif
 {
-	struct localvar_list *localvar_stop;
+	struct localvar_list *uninitialized_var(localvar_stop);
 	struct parsefile *file_stop;
 	struct redirtab *redir_stop;
 	struct stackmark smark;
-- 
Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--
To unsubscribe from this list: send the line "unsubscribe dash" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux