[git commit] bc: fix "warning: 's' may be used uninitialized in this function"

Denys Vlasenko vda.linux at googlemail.com
Wed Dec 5 19:25:03 UTC 2018


commit: https://git.busybox.net/busybox/commit/?id=657d6bb26265205556dcf3191f4a7c6ea26e9689
branch: https://git.busybox.net/busybox/commit/?id=refs/heads/master

Signed-off-by: Denys Vlasenko <vda.linux at googlemail.com>
---
 miscutils/bc.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/miscutils/bc.c b/miscutils/bc.c
index fbe671fd3..656ecd892 100644
--- a/miscutils/bc.c
+++ b/miscutils/bc.c
@@ -6987,6 +6987,7 @@ static BcStatus bc_vm_stdin(void)
 	// with a backslash to the parser. The reason for that is because the parser
 	// treats a backslash+newline combo as whitespace, per the bc spec. In that
 	// case, and for strings and comments, the parser will expect more stuff.
+	s = BC_STATUS_SUCCESS;
 	while (!G.eof && (s = bc_read_line(&buf, ">>> ")) == BC_STATUS_SUCCESS) {
 
 		char *string = buf.v;


More information about the busybox-cvs mailing list