summaryrefslogtreecommitdiff
path: root/tools/checkAPIs.pl
AgeCommit message (Collapse)AuthorFilesLines
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
2011-02-11Clean up indentationJeff Morriss1-378/+378
svn path=/trunk/; revision=35909
2011-02-10Add (commented-out for now) code to check certain function calls for embeddedJeff Morriss1-3/+44
(in the argument list) calls to tvb_get_ptr(). svn path=/trunk/; revision=35906
2011-02-04White space changes.Anders Broman1-71/+71
svn path=/trunk/; revision=35825
2011-02-02Add GTK 2.22 deprecated functionsAnders Broman1-308/+320
svn path=/trunk/; revision=35759
2011-01-10Revert 35447 and 35364: remove comments and strings in one regex (so it ↵Jeff Morriss1-9/+3
doesn't get confused by things like /* inside a string). And don't remove comments+strings before checking the hf's. svn path=/trunk/; revision=35453
2011-01-10Remove the comments and strings separately so that we can check the hf's ↵Jeff Morriss1-3/+9
when the comments are gone but the strings are not. svn path=/trunk/; revision=35447
2011-01-06Prohibit strtoull(): Windows doesn't have it. (Putting this in just saves ↵Jeff Morriss1-1/+3
waiting for the buildbot to complain.) svn path=/trunk/; revision=35410
2011-01-06Let's discourage the use of g_warning in dissectors. Either use one ofGuy Harris1-0/+1
the dissector-bug macros, or try your best to dissect a packet that's "wrong". svn path=/trunk/; revision=35409
2011-01-04Check hf entries *after* removing comments (in case there are commented-out ↵Jeff Morriss1-3/+3
entries). svn path=/trunk/; revision=35364
2011-01-04Detect (and error on) NULL or empty abbreviations. Wireshark aborts on the ↵Jeff Morriss1-1/+5
former and warns on the latter. svn path=/trunk/; revision=35363
2010-12-20Deprecate dissector_add(), dissector_change(), dissector_delete(),Jeff Morriss1-967/+977
dissector_get_port_handle(), dissector_reset(), dissector_try_port(), dissector_try_port_new(), and next_tvb_add_port(). Re-tabify the file. svn path=/trunk/; revision=35229
2010-10-30Make the hf_ checks errors (they've been running clean for a while now anyway).Jeff Morriss1-11/+24
svn path=/trunk/; revision=34711