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

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

 



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.

 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'				\
 	  $(_sc_search_regexp)
 	@prohibit='virAsprintf.*, *"%s",'				\
 	halt='use VIR_STRDUP instead of virAsprintf with "%s"'		\
@@ -406,7 +406,7 @@ sc_prohibit_risky_id_promotion:
 # since gnulib has more guarantees for snprintf portability
 sc_prohibit_sprintf:
 	@prohibit='\<[s]printf\>'					\
-	halt='use snprintf, not s'printf				\
+	halt='use snprintf, not s''printf'				\
 	  $(_sc_search_regexp)
 
 sc_prohibit_readlink:
@@ -432,12 +432,12 @@ sc_prohibit_gettext_noop:
 
 sc_prohibit_VIR_ERR_NO_MEMORY:
 	@prohibit='\<V''IR_ERR_NO_MEMORY\>'				\
-	halt='use virReportOOMError, not V'IR_ERR_NO_MEMORY		\
+	halt='use virReportOOMError, not V''IR_ERR_NO_MEMORY'		\
 	  $(_sc_search_regexp)
 
 sc_prohibit_PATH_MAX:
 	@prohibit='\<P''ATH_MAX\>'				\
-	halt='dynamically allocate paths, do not use P'ATH_MAX	\
+	halt='dynamically allocate paths, do not use P''ATH_MAX'	\
 	  $(_sc_search_regexp)
 
 # Use a subshell for each function, to give the optimal warning message.
-- 
2.5.5

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]