[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Warnings when running "bootstrap"
From: |
Paul Smith |
Subject: |
Re: Warnings when running "bootstrap" |
Date: |
Sun, 04 Sep 2022 21:39:05 -0400 |
User-agent: |
Evolution 3.44.4 (by Flathub.org) |
On Mon, 2022-09-05 at 00:16 +0000, Bjarni Ingi Gislason via Bug reports
and discussion for GNU make wrote:
> The compilation failed because I had an unclean git repository.
>
> My compilation creates a lot of warnings, which could be reduced if
> the header files were fixed
>
> 131 [-Walloca]
> 7 [-Wformat=]
> 5 [-Wformat-nonliteral]
> 3 [-Wimplicit-fallthrough=]
> 2 [-Wmaybe-uninitialized]
> 21 [-Wmissing-prototypes]
> 3 [-Wpedantic]
> 32 [-Wredundant-decls]
> 221 [-Wstrict-prototypes]
> 2 [-Wunused-but-set-variable]
> 69 [-Wunused-parameter]
> 1 [-Wunused-variable]
That's interesting because I see zero warnings in my builds, on
GNU/Linux Ubuntu 20.04 with GCC 9.4. If you wanted to send me the
output of a complete, clean build along with info about what OS and
compiler versions (you can send it directly to me with the output as an
attachment if you like) I can take a look.
When building the dist tarball none of these warnings will be enabled:
they are only enabled by default for maintainer builds and the Git repo
enables maintainer builds by default.
> /usr/bin/ld: src/misc.o: in function `get_tmppath':
> /home/bg/git/make/src/misc.c:562: warning: the use of `mktemp' is
> dangerous, better use `mkstemp' or `mkdtemp'
>
> In misc.c the "HAVE_MKSTEMP" in not checked first so "mktemp" is
> selected as my system has both versions.
Unfortunately we need mktemp in some situations: we need to create a
FIFO using mkfifo() and that takes a pathname, and we can't have an
existing file there of course so mkstemp doesn't help us.
GNU make uses mkstemp when it can, but sometimes we need mktemp.
I considered using mkdtemp to create a temporary directory and create
all temporary files (and fifo's) in that directory, but I haven't done
so yet. It would need to be deleted again as well.