aboutsummaryrefslogtreecommitdiffstats
path: root/tools/checkAPIs.pl
AgeCommit message (Collapse)AuthorFilesLines
2013-09-13Rename --build to --check-addtext/--nocheck-addtext for clarity.Chris Maynard1-9/+15
Add --check-addtext/--nocheck-addtext, --check-hf/--nocheck-hf and --debug to the usage output and format the usage output a little better. svn path=/trunk/; revision=52006
2013-09-05Make checkAPI notify (warnings only, for now) about deprecated emem functions.Evan Huus1-1/+61
svn path=/trunk/; revision=51782
2013-07-05Make checkAPIs.pl a little more discerning when looking for too many ↵Michael Mann1-2/+5
proto_tree_add_text()s. I believe the intent was to ignore "small" dissectors that didn't have enough fields to qualify, but the previous logic ignored dissectors that were (almost) all proto_tree_add_text and no proto_tree_add_xxx. I'm flexible on the definition of "small" (20 "fields"), but I think checkAPIs should flag the "all proto_tree_add_text" dissectors. svn path=/trunk/; revision=50385
2013-03-16flag up a warning if someone includes gcrypt.h instead of wsutil/wsgcrypt.hMartin Kaiser1-0/+24
svn path=/trunk/; revision=48340
2013-02-02Tweaks:Bill Meier1-6/+97
- Remove comments from the input string before checking hf[] entries; - Remove code under '#if 0' before doing API checks. svn path=/trunk/; revision=47447
2012-12-18Don't do proto_tree_add_ether(..., tvb_get_ptr(...)), just use ↵Jeff Morriss1-0/+1
proto_tree_add_item(). svn path=/trunk/; revision=46598
2012-12-02Add SET_ADDRESS and SET_ADDRESS_HF to the list of APIs we (may--if we ↵Jeff Morriss1-1/+3
uncomment the code) check for being called with tvb_get_ptr(). svn path=/trunk/; revision=46326
2012-11-29As requested by Anders on -dev: check enum_val_t's for NULL termination.Jeff Morriss1-0/+34
Also check that they are all const. svn path=/trunk/; revision=46294
2012-09-19Remove #defines that provided backward source compatibilityJörg Mayer1-7/+0
for deprecated dissector add/remmove/... functions. svn path=/trunk/; revision=45000
2012-09-10Use non-capturing grouping when grouping just for alternatives;Bill Meier1-6/+6
Also: improve error message slightly in the case of a missing NULL termination. svn path=/trunk/; revision=44826
2012-09-10string_strings and range_strings must also be {0, NULL} terminated.Jeff Morriss1-40/+42
Also, remove some tabs. svn path=/trunk/; revision=44824
2012-07-23r43756 said that _snwprintf is banned. Make it so.Jeff Morriss1-1/+2
svn path=/trunk/; revision=43939
2012-07-19Add a local errorCount variable to functions that use it, have themGuy Harris1-2/+7
return it, and use the return value. svn path=/trunk/; revision=43818
2012-07-19Yup, that did it. Make use of ENC_ values in non-item proto_tree_addGuy Harris1-1/+3
calls an error. Fix one case where we weren't counting an error (unregistered ett variables). svn path=/trunk/; revision=43817
2012-07-03As suggested by Jakub in ↵Jeff Morriss1-0/+39
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7429#c4 : Add checks for calls to proto_tree_add_XXX (where XXX != item and a few other functions) with an encoding (ENC_*) argument. Also add a comment to checkAddTextCalls() about why 3 loops are used. svn path=/trunk/; revision=43563
2012-06-28Update FSF address - part II.Jakub Zawadzki1-1/+1
svn path=/trunk/; revision=43538
2012-06-11Prohibit strtod() (as per r 43212).Jeff Morriss1-69/+70
Replace tabs with spaces (for consistency). svn path=/trunk/; revision=43213
2012-06-03Add more depricated functionsAnders Broman1-0/+3
svn path=/trunk/; revision=43040
2012-05-31Look only for calls to strlen() within an snprintf() call (not for any fileJeff Morriss1-5/+21
that has the string "strlen" somewhere after a call to snprintf()). svn path=/trunk/; revision=42950
2012-05-31If we're feeding the output of strlen to an snprintf-style functionGerald Combs1-1/+5
there's a good chance we're doing something wrong. svn path=/trunk/; revision=42947
2012-05-24Followup to r42823: check for RVALS used without BASE_RANGE_STRING.Jeff Morriss1-12/+16
Also: identify problematic fields by hf_variable_name instead of name or abbreviation (the variable name is sure to be unique). svn path=/trunk/; revision=42826
2012-04-04Add a "-build" argument to checkAPIs.pl. Use that argument when buildingJeff Morriss1-2/+6
from makefiles (and thus from the buildbot). The intention is to be able to tell when a human is running the tool so we can provide more code-review guidance. As a starter, enable the "too many proto_tree_add_text() calls" check when a human is running the tool. svn path=/trunk/; revision=41943
2012-03-07Revise and enable test for hf[] FT_BOOLEAN fields with a non-zero bit mask ↵Bill Meier1-8/+9
and with BASE_... in the 'display' field. svn path=/trunk/; revision=41399
2012-03-06Add test for correct usage of hf[] FT_BOOLEAN 'display' field;Bill Meier1-0/+8
(Commented out until all the incorrect usages in Wireshark have been fixed). svn path=/trunk/; revision=41380
2012-03-06Prohibit using anything other than FT_BOOLEANs with true_false_strings.Jeff Morriss1-0/+8
Prohibit using FT_BOOLEANS with value_strings. svn path=/trunk/; revision=41364
2012-02-24g_fprintf() & g_vfprintf() should not be used....Bill Meier1-0/+4
svn path=/trunk/; revision=41181
2012-02-08As suggested by Joerg on the -dev list yesterday: count up the number ofJeff Morriss1-1/+39
proto_tree_add_text() calls and compare that to the number of proto_tree_add_<something else>() calls and complain if more than 50% of the calls are add_text()'s. proto_tree_add_text() calls whose returned proto_item is used are not counted as hanging a subtree off a text item is an appropriate use for text items. I chose 50% because even at that level there are many dissectors with "too many" proto_tree_add_text()'s. The function to do all of this is commented out for now for the same reason plus the fact that it's pretty slow. svn path=/trunk/; revision=40930
2012-01-19Update list of deprecated GLib fcns;Bill Meier1-61/+85
Add comment about Wireshark build defines G_DISABLE_DEPRECATED. svn path=/trunk/; revision=40584
2012-01-18Fix a typo; Remove a dup.Bill Meier1-3/+1
svn path=/trunk/; revision=40572
2012-01-18Update:Bill Meier1-1518/+1558
- Mark GDK functions which aren't used as 'E' - Add GTK functions deprecated after GTK 2.20 - Add some comments about use of GTK_DISABLE_DEPRECATED - reformat ... svn path=/trunk/; revision=40569
2012-01-16The last GMemChunk usage in Wireshark has been replaced; Error out for any ↵Bill Meier1-16/+16
such usage. svn path=/trunk/; revision=40548
2011-08-17The MSDN page for ZeroMemory recommends using SecureZeroMemory instead,Gerald Combs1-0/+3
so do so. Add ZeroMemory to checkAPIs.pl. svn path=/trunk/; revision=38584
2011-08-05Using gtk_tree_view_column_get_cell_renderers is an error now.Jörg Mayer1-1/+1
svn path=/trunk/; revision=38357
2011-07-25Update comments.Anders Broman1-3/+7
svn path=/trunk/; revision=38202
2011-07-25Use gtk_widget_get_has_window() as a wrapper aroundGuy Harris1-1/+1
GTK_WIDGET_NO_WINDOW() in pre-2.18 versions of GTK+. Treat calls to GTK_WIDGET_NO_WINDOW() as an error in checkAPIs.pl. svn path=/trunk/; revision=38197
2011-07-25Fix a couple of typos and 'E'' mark functions mapped in old-gtk-compat.hAnders Broman1-35/+38
svn path=/trunk/; revision=38196
2011-07-24Replace deprecated functions.Anders Broman1-2/+2
Udate comments in CheckAPIs svn path=/trunk/; revision=38185
2011-07-14Replace deprecated gdk_pixmap_unref() with g_object_unref().Anders Broman1-16/+18
Update checkAPIs. svn path=/trunk/; revision=38013
2011-07-11Fix more tooltips, mark gtk_tooltips_new with 'E' in checkapi.Anders Broman1-5/+5
svn path=/trunk/; revision=37976
2011-06-28Replace all strerror() with g_strerror().Stig Bjørlykke1-1/+2
Remove our local strerror implementation. Mark strerror as locale unsafe API. This fixes bug 5715. svn path=/trunk/; revision=37812
2011-06-23Add GDK deprecated functions.Anders Broman1-86/+336
svn path=/trunk/; revision=37765
2011-05-26Inspired by one of the changes from r37406 and bug 2794: detect hf abbreviationsJeff Morriss1-0/+4
with two or more periods in a row. Fix one case of that. svn path=/trunk/; revision=37407
2011-04-21"Upgrade" gtk_combo to 'E'.Anders Broman1-163/+163
svn path=/trunk/; revision=36746
2011-03-29Prohibit (memory-unsafe) g_sprintf() and g_vsprintf().Jeff Morriss1-0/+2
svn path=/trunk/; revision=36390
2011-03-08W -> E for g_clist funktions.Anders Broman1-143/+143
svn path=/trunk/; revision=36171
2011-03-02As suggested by Anders: when we detect non-ASCII characters, print the lineJeff Morriss1-7/+10
number on which we found them. svn path=/trunk/; revision=36122
2011-02-12There is a better (and faster) way to see if all the members of one list areJeff Morriss1-24/+28
in another list: convert the 2nd list to a hash. This speeds checking for ett_ variables up considerably. Store the pattern to match ett_ variable names in a variable (since it's used 3 times). Only match ett_ variable declarations that start on their own line (hopefully to speed things up a bit). svn path=/trunk/; revision=35929
2011-02-11Add a function to verify that ett_ variables are registered (or at leastJeff Morriss1-3/+99
stored in an array which will hopefully be registered). This is a work-in-progress, so the function is not called. It is also EXTREMELY slow on big files. (Or maybe it's looping... I haven't yet had the patience to let it finish processing packet-rrc.c .) svn path=/trunk/; revision=35923
2011-02-11Check for places where tvb_bytes_to_str() or tvb_get_bytes_to_str_punct()Jeff Morriss1-3/+7
should be used (instead of the non-tvb functions with a call to tvb_get_ptr()). Use those functions in a bunch of places. svn path=/trunk/; revision=35911
2011-02-11Oops, put a comma backJeff Morriss1-1/+1
svn path=/trunk/; revision=35910