bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 1/8] remove warning messages on rpctrace from 'asprintf'


From: Kalle Olavi Niemitalo
Subject: Re: [PATCH 1/8] remove warning messages on rpctrace from 'asprintf'
Date: Sun, 06 Nov 2016 22:36:49 +0200
User-agent: Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.51 (gnu/linux)

"Brent W. Baccala" <cosine@freesoft.org> writes:

> +  va_start(argptr, fmt);
> +  retval = vasprintf(strp, fmt, argptr);
> +  va_end(argptr);
> +
> +  assert_perror(retval == -1);

The argument of assert_perror should be an errno_t value, not
just a Boolean.

It isn't clear from the commit message that the warning message
occurs at compile time.

Could add an __attribute__ so that GCC can validate that the
arguments of easprintf match the format string, like it already
validates the arguments of asprintf.
https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html



reply via email to

[Prev in Thread] Current Thread [Next in Thread]