aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2015-01-02 12:34:21 -0500
committerMichael Mann <mmann78@netscape.net>2015-01-02 17:38:18 +0000
commitb90f7846f4e289680eb6812d64329fa578ca7443 (patch)
treebe5d983cb2fa9a849e0c4c3f216a342f3e9fe351 /tools
parente7d0cdc061ade9e324fc02be61a36b0c6f52874f (diff)
Add sanity check to ensure integer types don't get set to BASE_NONE.
This is checked by Wireshark, but the script should catch it earlier in case Wireshark/TShark isn't run after the script is executed (a mistake I've made several times). Change-Id: I1d113871b10fcae5a6d3e9036cc80d7b1ec1ae57 Reviewed-on: https://code.wireshark.org/review/6245 Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'tools')
-rwxr-xr-xtools/convert_proto_tree_add_text.pl15
1 files changed, 15 insertions, 0 deletions
diff --git a/tools/convert_proto_tree_add_text.pl b/tools/convert_proto_tree_add_text.pl
index 8155394a87..3ed4711393 100755
--- a/tools/convert_proto_tree_add_text.pl
+++ b/tools/convert_proto_tree_add_text.pl
@@ -299,6 +299,21 @@ sub verify_line {
$errors++;
}
}
+ if (($proto_tree_item[9] eq "FT_UINT8") ||
+ ($proto_tree_item[9] eq "FT_UINT16") ||
+ ($proto_tree_item[9] eq "FT_UINT24") ||
+ ($proto_tree_item[9] eq "FT_UINT32") ||
+ ($proto_tree_item[9] eq "FT_UINT64") ||
+ ($proto_tree_item[9] eq "FT_INT8") ||
+ ($proto_tree_item[9] eq "FT_INT16") ||
+ ($proto_tree_item[9] eq "FT_INT24") ||
+ ($proto_tree_item[9] eq "FT_INT32") ||
+ ($proto_tree_item[9] eq "FT_INT64")) {
+ if ($proto_tree_item[11] eq "BASE_NONE") {
+ print "$line_number: Interger type should not be BASE_NONE!\n";
+ $errors++;
+ }
+ }
} elsif ($proto_tree_item[1] eq "2") {
if (!($proto_tree_item[3] =~ /^ei_/)) {