Michael Mann
625fbd5f9a
Allow a "more complex" algorithm to finding proto_tree_add_text overuse. Disabled by default, but used when I want to go on an add filterability spree. convert_proto_tree_add_text.pl makes these easier to fix, so why not be pickier about the percentages that dissectors use.
...
svn path=/trunk/; revision=52392
2013-10-06 02:07:47 +00:00
Jörg Mayer
4e74f3a3c3
Don't print a warning about missing svn id when the argument is not
...
a file. Warn about the "wrong" filetype and continue
svn path=/trunk/; revision=52105
2013-09-16 20:30:34 +00:00
Evan Huus
464bbb1275
Tweak mq macro and checkAPI to avoid false positives - "garbage"
...
(like a #define) at the beginning of a line before a value_string no longer
matches so a #define that includes the beginning of a value_string doesn't
confuse the script.
svn path=/trunk/; revision=52089
2013-09-15 22:34:36 +00:00
Jörg Mayer
98baf8ba18
Add help option
...
List options one by one
svn path=/trunk/; revision=52068
2013-09-15 17:50:18 +00:00
Jörg Mayer
05ba7d3afc
http://url is NOT a c++ style comment
...
svn path=/trunk/; revision=52061
2013-09-15 14:49:16 +00:00
Chris Maynard
50bcbef658
OK, all the Makefiles use -build since r41943, so add that option back for now.
...
svn path=/trunk/; revision=52016
2013-09-13 18:11:29 +00:00
Chris Maynard
051c082a8c
Update the comments to match the current usage.
...
svn path=/trunk/; revision=52015
2013-09-13 18:00:32 +00:00
Chris Maynard
9c7e47fb2e
Rename --build to --check-addtext/--nocheck-addtext for clarity.
...
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-13 16:52:08 +00:00
Evan Huus
47e241f6c4
Make checkAPI notify (warnings only, for now) about deprecated emem functions.
...
svn path=/trunk/; revision=51782
2013-09-05 12:50:24 +00:00
Michael Mann
e2cfb1f173
Make checkAPIs.pl a little more discerning when looking for too many 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-07-05 14:22:35 +00:00
Martin Kaiser
c7dd35dffc
flag up a warning if someone includes gcrypt.h instead of wsutil/wsgcrypt.h
...
svn path=/trunk/; revision=48340
2013-03-16 09:53:19 +00:00
Bill Meier
eeb90f99b7
Tweaks:
...
- Remove comments from the input string before checking hf[] entries;
- Remove code under '#if 0' before doing API checks.
svn path=/trunk/; revision=47447
2013-02-02 15:13:45 +00:00
Jeff Morriss
02a69849b7
Don't do proto_tree_add_ether(..., tvb_get_ptr(...)), just use proto_tree_add_item().
...
svn path=/trunk/; revision=46598
2012-12-18 22:29:11 +00:00
Jeff Morriss
a41c5abab1
Add SET_ADDRESS and SET_ADDRESS_HF to the list of APIs we (may--if we uncomment the code) check for being called with tvb_get_ptr().
...
svn path=/trunk/; revision=46326
2012-12-02 05:05:04 +00:00
Jeff Morriss
5ee917aea7
As requested by Anders on -dev: check enum_val_t's for NULL termination.
...
Also check that they are all const.
svn path=/trunk/; revision=46294
2012-11-29 20:25:15 +00:00
Jörg Mayer
30b7b74dde
Remove #defines that provided backward source compatibility
...
for deprecated dissector add/remmove/... functions.
svn path=/trunk/; revision=45000
2012-09-19 07:20:49 +00:00
Bill Meier
5e4bff84d3
Use non-capturing grouping when grouping just for alternatives;
...
Also: improve error message slightly in the case of a missing NULL termination.
svn path=/trunk/; revision=44826
2012-09-10 01:53:23 +00:00
Jeff Morriss
b1a5af9eed
string_strings and range_strings must also be {0, NULL} terminated.
...
Also, remove some tabs.
svn path=/trunk/; revision=44824
2012-09-10 00:48:50 +00:00
Jeff Morriss
1959d4d6bf
r43756 said that _snwprintf is banned. Make it so.
...
svn path=/trunk/; revision=43939
2012-07-23 16:57:16 +00:00
Guy Harris
41be8e4344
Add a local errorCount variable to functions that use it, have them
...
return it, and use the return value.
svn path=/trunk/; revision=43818
2012-07-19 07:02:00 +00:00
Guy Harris
66ed910844
Yup, that did it. Make use of ENC_ values in non-item proto_tree_add
...
calls an error.
Fix one case where we weren't counting an error (unregistered ett
variables).
svn path=/trunk/; revision=43817
2012-07-19 04:16:15 +00:00
Jeff Morriss
3d1b5e3474
As suggested by Jakub in 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-07-03 21:55:55 +00:00
Jakub Zawadzki
b18e880040
Update FSF address - part II.
...
svn path=/trunk/; revision=43538
2012-06-28 23:18:38 +00:00
Jeff Morriss
41242190b0
Prohibit strtod() (as per r 43212).
...
Replace tabs with spaces (for consistency).
svn path=/trunk/; revision=43213
2012-06-11 19:42:05 +00:00
Anders Broman
3ae9cc81c4
Add more depricated functions
...
svn path=/trunk/; revision=43040
2012-06-03 18:03:51 +00:00
Jeff Morriss
ea9e7c2359
Look only for calls to strlen() within an snprintf() call (not for any file
...
that has the string "strlen" somewhere after a call to snprintf()).
svn path=/trunk/; revision=42950
2012-05-31 21:19:39 +00:00
Gerald Combs
35c22ed068
If we're feeding the output of strlen to an snprintf-style function
...
there's a good chance we're doing something wrong.
svn path=/trunk/; revision=42947
2012-05-31 20:12:27 +00:00
Jeff Morriss
7f1ccd46ec
Followup to r42823: check for RVALS used without BASE_RANGE_STRING.
...
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-05-24 14:52:06 +00:00
Jeff Morriss
75c3c92f19
Add a "-build" argument to checkAPIs.pl. Use that argument when building
...
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-04-04 20:46:49 +00:00
Bill Meier
3b9d2fcb93
Revise and enable test for hf[] FT_BOOLEAN fields with a non-zero bit mask and with BASE_... in the 'display' field.
...
svn path=/trunk/; revision=41399
2012-03-07 16:19:24 +00:00
Bill Meier
7504e53a5e
Add test for correct usage of hf[] FT_BOOLEAN 'display' field;
...
(Commented out until all the incorrect usages in Wireshark have been fixed).
svn path=/trunk/; revision=41380
2012-03-06 20:56:51 +00:00
Jeff Morriss
4cd18234d6
Prohibit using anything other than FT_BOOLEANs with true_false_strings.
...
Prohibit using FT_BOOLEANS with value_strings.
svn path=/trunk/; revision=41364
2012-03-06 02:27:29 +00:00
Bill Meier
d0e9923506
g_fprintf() & g_vfprintf() should not be used....
...
svn path=/trunk/; revision=41181
2012-02-24 19:02:28 +00:00
Jeff Morriss
e8ff75961f
As suggested by Joerg on the -dev list yesterday: count up the number of
...
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-02-08 14:15:01 +00:00
Bill Meier
cffa41f052
Update list of deprecated GLib fcns;
...
Add comment about Wireshark build defines G_DISABLE_DEPRECATED.
svn path=/trunk/; revision=40584
2012-01-19 14:22:46 +00:00
Bill Meier
0908f1c81c
Fix a typo; Remove a dup.
...
svn path=/trunk/; revision=40572
2012-01-18 21:37:55 +00:00
Bill Meier
5940047af0
Update:
...
- 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-18 21:08:18 +00:00
Bill Meier
5f2cf1a036
The last GMemChunk usage in Wireshark has been replaced; Error out for any such usage.
...
svn path=/trunk/; revision=40548
2012-01-16 19:31:44 +00:00
Gerald Combs
5520a452b5
The MSDN page for ZeroMemory recommends using SecureZeroMemory instead,
...
so do so. Add ZeroMemory to checkAPIs.pl.
svn path=/trunk/; revision=38584
2011-08-17 16:54:24 +00:00
Jörg Mayer
91ad1c8086
Using gtk_tree_view_column_get_cell_renderers is an error now.
...
svn path=/trunk/; revision=38357
2011-08-05 10:40:45 +00:00
Anders Broman
3e446c629c
Update comments.
...
svn path=/trunk/; revision=38202
2011-07-25 15:55:27 +00:00
Guy Harris
494f9820fb
Use gtk_widget_get_has_window() as a wrapper around
...
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-25 06:40:01 +00:00
Anders Broman
a5efd9b3b2
Fix a couple of typos and 'E'' mark functions mapped in old-gtk-compat.h
...
svn path=/trunk/; revision=38196
2011-07-25 04:13:46 +00:00
Anders Broman
1c09e4a694
Replace deprecated functions.
...
Udate comments in CheckAPIs
svn path=/trunk/; revision=38185
2011-07-24 16:50:55 +00:00
Anders Broman
6814cd03ee
Replace deprecated gdk_pixmap_unref() with g_object_unref().
...
Update checkAPIs.
svn path=/trunk/; revision=38013
2011-07-14 08:11:16 +00:00
Anders Broman
1f923105f8
Fix more tooltips, mark gtk_tooltips_new with 'E' in checkapi.
...
svn path=/trunk/; revision=37976
2011-07-11 20:01:28 +00:00
Stig Bjørlykke
8443bbbf75
Replace all strerror() with g_strerror().
...
Remove our local strerror implementation.
Mark strerror as locale unsafe API.
This fixes bug 5715.
svn path=/trunk/; revision=37812
2011-06-28 09:00:11 +00:00
Anders Broman
ca9bb67aa6
Add GDK deprecated functions.
...
svn path=/trunk/; revision=37765
2011-06-23 13:04:19 +00:00
Jeff Morriss
8ce306faa0
Inspired by one of the changes from r37406 and bug 2794: detect hf abbreviations
...
with two or more periods in a row. Fix one case of that.
svn path=/trunk/; revision=37407
2011-05-26 13:32:04 +00:00
Anders Broman
73c91d6fa0
"Upgrade" gtk_combo to 'E'.
...
svn path=/trunk/; revision=36746
2011-04-21 06:05:55 +00:00