Bug 40648

Summary: [lcc] error: variable "prevsyntax" is used uninitialized
Product: Sisyphus Reporter: Michael Shigorin <mike>
Component: ashAssignee: Alexey Gladkov <legion>
Status: CLOSED WONTFIX QA Contact: qa-sisyphus
Severity: minor    
Priority: P5 CC: glebfm, ldv, legion, placeholder
Version: unstable   
Hardware: e2k   
OS: Linux   
Attachments:
Description Flags
patches from sisyphus_e2k's ash 0.5.8-alt1 package (borrowed from led@'s 0.5.8-12.1 one) none

Description Michael Shigorin 2021-08-04 09:21:46 MSK
Created attachment 9552 [details]
patches from sisyphus_e2k's ash 0.5.8-alt1 package (borrowed from led@'s 0.5.8-12.1 one)

This *might* be the compiler overlooking tricky variable initialization but might as well be a bug indeed:

make[3]: Entering directory '/usr/src/RPM/BUILD/ash-0.5.8/build-dynamic/src'
e2k-alt-linux-gcc -DHAVE_CONFIG_H -I. -I../../src -I..  -include ../config.h -DBSD=1 -DSHELL -DIFS_BROKEN  -Wall -Wall -Wunused-function -Wunused-label -Wunused-variable -Wunused-value -Werror -c -o parser.o ../../src/parser.c
lcc: "../../src/parser.c", line 873: in function "readtoken1":
lcc: "../../src/parser.c", line 886: error: variable "prevsyntax" is used
          uninitialized [-Werror=uninitialized]

make[3]: *** [Makefile:476: parser.o] Error 1
make[3]: Leaving directory '/usr/src/RPM/BUILD/ash-0.5.8/build-dynamic/src'

...while building ash-0.5.8-alt1.2e5842258.src.rpm on e2kv4 with lcc 1.25.17 (EDG-based compiler); 0.5.8 with the patchset attached builds fine for me (although none of those patches borrowed from led@'s OBS 0.5.8-12.1 package seem to be relevant to this particular issue).
Comment 1 Alexey Gladkov 2021-08-04 10:25:36 MSK
The proposed patches are not fixes of the described issue. Among them, I found a patch that adds an losetup to builtin. Also, patches are duplicated in the archive.

After a quick look at the patches, I come to the conclusion that they greatly change the behavior of the shell unrelated to the described issue. 

You can suggest such changes to upstream for truly review: dash@vger.kernel.org