[libvirt] [PATCH 4/4] cfg.mk: Always enclose syntax-check error messages in quotes

Peter Krempa pkrempa at redhat.com
Tue Apr 12 06:47:25 UTC 2016


On Mon, Apr 11, 2016 at 17:32:46 +0200, Andrea Bolognani wrote:
> To prevent the error messages in cfg.mk from triggering the very
> same rules they're supposed to explain, we split the message in
> the middle of a symbol name.
> 
> In some cases we end up with something like
> 
>   'I am a me'ssage
> 
> However, using a little more punctuation and ensuring the message
> is properly enclosed in quotes is nicer.
> ---
> A more proper fix is arguably to exclude cfg.mk from these specific
> checks... It's not like we're going to use asprintf() in a Makefile
> anyway.

I've actually thought it's done this way ...

>  cfg.mk | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/cfg.mk b/cfg.mk
> index cd3b515..15e7c40 100644
> --- a/cfg.mk
> +++ b/cfg.mk
> @@ -379,7 +379,7 @@ sc_prohibit_strtol:
>  # But for plain %s, virAsprintf is overkill compared to strdup.
>  sc_prohibit_asprintf:
>  	@prohibit='\<v?a[s]printf\>'					\
> -	halt='use virAsprintf, not as'printf				\
> +	halt='use virAsprintf, not as''printf'				\

... until I saw this stuff. Yuck.

ACK though since it works.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20160412/32e3f347/attachment-0001.sig>


More information about the libvir-list mailing list