On Sun, Sep 13, 2020 at 09:05:32PM +0200, Bruno Haible wrote:
> > 2020-09-12 Ben Pfaff
> >
> > Check for nonnull prompt argument while avoiding warnings.
> > * lib/getpass.c (_GL_ARG_NONNULL): Define to empty.
> > (getpass) [!_WIN32]: Print prompt only if nonnull.
>
> Looks good. A
Hi Ben,
> * The POSIX implementation in gnulib passes the prompt to fputs()
> without checking for null. I guess we should fix it.
Yes. This bit of added robustness doesn't cost much (neither in terms
of source code and maintenance, nor in terms of generated code).
> From: Ben Pfaff
> Da
On Sun, Sep 13, 2020 at 10:32:27AM +0200, Bruno Haible wrote:
> > The prompt parameter to getpass() is declared as nonnull (using a GCC
> > nonnull attribute), but the implementation checks whether it is null in
> > two places. GCC warns about this. This commit removes the checks
>
> GCC warning
Hi Ben,
> The prompt parameter to getpass() is declared as nonnull (using a GCC
> nonnull attribute), but the implementation checks whether it is null in
> two places. GCC warns about this. This commit removes the checks
GCC warnings ought to help us make the code more robust. Removing the
NULL
The prompt parameter to getpass() is declared as nonnull (using a GCC
nonnull attribute), but the implementation checks whether it is null in
two places. GCC warns about this. This commit removes the checks, which
don't appear in the Gnulib POSIX implementation or the glibc
implementation.
---
I