aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorPeter Wu <peter@lekensteyn.nl>2018-10-26 15:58:04 +0200
committerPeter Wu <peter@lekensteyn.nl>2018-10-26 14:28:00 +0000
commit52d60cac72e69cdda020b65aa9b9985c7d604fb2 (patch)
tree313acdf21593215b7198590f5f70ba35108365a9 /tools
parent4a2739ec88dff4c580ba51508a4cf3944718d09d (diff)
checkAPIs.pl: fix false positive in value_string.h
check_value_string_arrays accidentally considered a part of value_string.h as value_string definition: Error: epan/value_string.h : {0, NULL} is required as the last value_string array entry: value_string array_name[] #define _VS_ARRAY_TYPE_NAME(array_name) const value_string array_name[] #define _VS_ENUM_ENTRY( name, value, string) name Stripping all pre-processor statements (like #define) would be one way to solve it, but at least one function checks for the presence of a macro, so instead forbid '#' in the regex for variable name. Change-Id: I4f47b3a42714c5bc526b0ecd8d2fb1ab076d00a2 Fixes: v2.9.0rc0-1929-g73644b3f76 ("checkAPIs.pl: speed up check_value_string_arrays and remove_if0_code") Reviewed-on: https://code.wireshark.org/review/30391 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Diffstat (limited to 'tools')
-rwxr-xr-xtools/checkAPIs.pl2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/checkAPIs.pl b/tools/checkAPIs.pl
index ced7bb22a1..fe9a5c6724 100755
--- a/tools/checkAPIs.pl
+++ b/tools/checkAPIs.pl
@@ -406,7 +406,7 @@ my $StaticRegex = qr/ static \s+
my $ConstRegex = qr/ const \s+ /xs;
my $Static_andor_ConstRegex = qr/ (?: $StaticRegex $ConstRegex | $StaticRegex | $ConstRegex) /xs;
my $ValueStringVarnameRegex = qr/ (?:value|val64|string|range|bytes)_string /xs;
-my $ValueStringRegex = qr/ $Static_andor_ConstRegex ($ValueStringVarnameRegex) \ + [^;*]+ = [^;]+ [{] .+? [}] \s*? ; /xs;
+my $ValueStringRegex = qr/ $Static_andor_ConstRegex ($ValueStringVarnameRegex) \ + [^;*#]+ = [^;]+ [{] .+? [}] \s*? ; /xs;
my $EnumValRegex = qr/ $Static_andor_ConstRegex enum_val_t \ + [^;*]+ = [^;]+ [{] .+? [}] \s*? ; /xs;
my $NewlineStringRegex = qr/ ["] [^"]* \\n [^"]* ["] /xs;