dspinellis / dgsh

Shell supporting pipelines to and from multiple processes
http://www.spinellis.gr/sw/dgsh/
Other
323 stars 22 forks source link

error: 'dir_fd' may be used uninitialized in this function #105

Closed Gooberpatrol66 closed 6 years ago

Gooberpatrol66 commented 6 years ago

build.log

dspinellis commented 6 years ago

This seems to be a GNU coreutils problem. Try going back to a stable revision.

Gooberpatrol66 commented 6 years ago

How do I do that?

dspinellis commented 6 years ago

You could follow the instructions listed here for the coreutils submodule. Use a recent stable version, such as v8.29.

Gooberpatrol66 commented 6 years ago

Just to be clear: I need to checkout from gnu savannah? Doesn't this project depend on your fork with your modifications?

dspinellis commented 6 years ago

Good question! These are subrepos. So you'd need to backtrack with git reset to the last dgsh change, and then git pull from the vendor (GNU) source in order to merge up to the corresponding stable version. Sorry if this is complicated.

Alternatively, you can report the problem and wait for the coreutils mainteners to fix it.

mfragkoulis commented 6 years ago

The coreutils subrepo links to https://github.com/mfragkoulis/coreutils, but the issue you have reported manifests within a subrepo of coreutils, gnulib (gnulib@841c4fa at lib/fts.c:1306). The gnulib subrepo links to gnulib's main repo, that is https://savannah.gnu.org/git/?group=gnulib. So the issue is not related to dgsh.

One solution is to build dgsh/coreutils using the compiler flag -Wno-maybe-uninitialized. Note that the warning/error may be a false positive produced by the compiler. Alternatively, you can also open dgsh/unix-tools/coreutils/gnulib/lib/fts.c:1306 and give an initial value to int dir_fd;