Error out if someone passes the address of a pointer to a *_string to VALS() or RVALS().

Change-Id: I85021b1cba151c16bf0a2d30169cf3dec77780f5
Reviewed-on: https://code.wireshark.org/review/1540
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
This commit is contained in:
Jeff Morriss 2014-05-06 17:12:13 -04:00 committed by Anders Broman
parent 24ca06f512
commit 343098761f
1 changed files with 8 additions and 0 deletions

View File

@ -1841,6 +1841,14 @@ sub check_hf_entries($$)
print STDERR "Error: $hf uses RVALS but 'display' does not include BASE_RANGE_STRING in $filename\n";
$errorCount++;
}
if ($convert =~ m/^VALS\(&.*\)/) {
print STDERR "Error: $hf is passing the address of a pointer to VALS in $filename\n";
$errorCount++;
}
if ($convert =~ m/^RVALS\(&.*\)/) {
print STDERR "Error: $hf is passing the address of a pointer to RVALS in $filename\n";
$errorCount++;
}
## Benign...
## if (($ft eq "FT_BOOLEAN") && ($bitmask =~ /^(0x)?0+$/) && ($display ne "BASE_NONE")) {
## print STDERR "Error: $abbrev: FT_BOOLEAN with no bitmask must use BASE_NONE for 'display' in $filename\n";