From 72181978d5968c14d2522dcc69a227803ccd7335 Mon Sep 17 00:00:00 2001 From: Eric Blake Date: Thu, 26 Jul 2012 08:29:15 -0600 Subject: [PATCH] maint: avoid empty regex in syntax checker We were defining 'func_or' as '|VIR_ERROR|...', which when put inside 'func_re' resulted in a regex that matches everything in isolation. Thankfully, we always used func_re with a leading anchor \<, and since the empty regex does not start a word, we happened to get the result we wanted; but it's better to define func_or without a leading space converted into a leading empty alternation. * cfg.mk (func_or): Strip leading space. --- cfg.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cfg.mk b/cfg.mk index 0bf909d32c..882b2bec15 100644 --- a/cfg.mk +++ b/cfg.mk @@ -547,7 +547,7 @@ msg_gen_function += xenapiSessionErrorHandler # msg_gen_function += vshPrint # msg_gen_function += vshError -func_or := $(shell printf '$(msg_gen_function)'|tr -s '[[:space:]]' '|') +func_or := $(shell echo $(msg_gen_function)|tr -s ' ' '|') func_re := ($(func_or)) # Look for diagnostics that aren't marked for translation.