Commit Graph

232 Commits

Author SHA1 Message Date
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
Jeff Morriss 892d734975 Prohibit (memory-unsafe) g_sprintf() and g_vsprintf().
svn path=/trunk/; revision=36390
2011-03-29 01:27:20 +00:00
Anders Broman 49ac7b9759 W -> E for g_clist funktions.
svn path=/trunk/; revision=36171
2011-03-08 19:55:22 +00:00
Jeff Morriss 1e425a1d66 As suggested by Anders: when we detect non-ASCII characters, print the line
number on which we found them.

svn path=/trunk/; revision=36122
2011-03-02 17:18:34 +00:00
Jeff Morriss 2620f18569 There is a better (and faster) way to see if all the members of one list are
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-12 03:53:29 +00:00
Jeff Morriss e13389a2b7 Add a function to verify that ett_ variables are registered (or at least
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-11 22:44:29 +00:00
Jeff Morriss d8659693ef Check for places where tvb_bytes_to_str() or tvb_get_bytes_to_str_punct()
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-11 02:43:07 +00:00
Jeff Morriss 8d03f63e17 Oops, put a comma back
svn path=/trunk/; revision=35910
2011-02-11 02:29:45 +00:00
Jeff Morriss 1a0287a486 Clean up indentation
svn path=/trunk/; revision=35909
2011-02-11 02:27:33 +00:00
Jeff Morriss 7be63e199b Add (commented-out for now) code to check certain function calls for embedded
(in the argument list) calls to tvb_get_ptr().

svn path=/trunk/; revision=35906
2011-02-10 22:53:48 +00:00
Anders Broman 6f598e72e1 White space changes.
svn path=/trunk/; revision=35825
2011-02-04 16:22:37 +00:00
Anders Broman 583d2776f5 Add GTK 2.22 deprecated functions
svn path=/trunk/; revision=35759
2011-02-02 17:11:26 +00:00
Jeff Morriss f09b22e600 Revert 35447 and 35364: remove comments and strings in one regex (so it 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-10 14:43:29 +00:00
Jeff Morriss d6393bba6e Remove the comments and strings separately so that we can check the hf's when the comments are gone but the strings are not.
svn path=/trunk/; revision=35447
2011-01-10 03:04:26 +00:00
Jeff Morriss b0beaec6a1 Prohibit strtoull(): Windows doesn't have it. (Putting this in just saves waiting for the buildbot to complain.)
svn path=/trunk/; revision=35410
2011-01-06 23:23:28 +00:00
Guy Harris e3e9007f28 Let's discourage the use of g_warning in dissectors. Either use one of
the dissector-bug macros, or try your best to dissect a packet that's
"wrong".

svn path=/trunk/; revision=35409
2011-01-06 23:04:48 +00:00
Jeff Morriss 7a5c44beed Check hf entries *after* removing comments (in case there are commented-out entries).
svn path=/trunk/; revision=35364
2011-01-04 18:48:26 +00:00
Jeff Morriss c18d15f9f7 Detect (and error on) NULL or empty abbreviations. Wireshark aborts on the former and warns on the latter.
svn path=/trunk/; revision=35363
2011-01-04 18:43:24 +00:00
Jeff Morriss 67aba31f94 Deprecate dissector_add(), dissector_change(), dissector_delete(),
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-12-20 16:39:09 +00:00
Jeff Morriss 9dcabb82c9 Make the hf_ checks errors (they've been running clean for a while now anyway).
svn path=/trunk/; revision=34711
2010-10-30 13:23:58 +00:00
Jeff Morriss 052825d8e6 Fix the blurb regexp (sigh)
svn path=/trunk/; revision=34418
2010-10-08 00:29:17 +00:00
Jeff Morriss 390252fa29 Escape the pipe (alternation) in the display regexp.
svn path=/trunk/; revision=34406
2010-10-07 16:51:25 +00:00
Jeff Morriss 77327f1b6f Tighten the blurb regexp. Check for leading/trailing white space in blurbs. Check for any white space in the abbreviation.
svn path=/trunk/; revision=34405
2010-10-07 16:40:22 +00:00
Jeff Morriss 8947fc6a89 Enable hf checks by default. Add a check to see if the abbreviation is equal to the hf_variable_name.
svn path=/trunk/; revision=34398
2010-10-06 21:54:01 +00:00
Jeff Morriss 4dc93213e3 Don't use a regexp to compare the name to the blurb, just convert them both to lower case before doing the comparison.
svn path=/trunk/; revision=34324
2010-10-02 01:47:16 +00:00
Jeff Morriss c39f840519 When checking hf, do a case-insensitive comparison between the name and the blurb.
svn path=/trunk/; revision=34323
2010-10-02 01:34:31 +00:00
Jeff Morriss d7b10fbe55 Inspired by https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3548 :
Add the option to check hf entries for various problems.  This is disabled by
default for the moment as it's quite noisy.

The regexps may need some additional fine tuning (or maybe simplification),
but they seem to work pretty well.

Arguably this might make more sense in checkhf.pl but it was easier to integrate
into this script.

svn path=/trunk/; revision=34240
2010-09-24 20:26:29 +00:00
Jeff Morriss 2b52159449 Follow up to bug 5209 and rev 34115:
%hh is C99 so remove it from packet-ssl-utils and add it to the banned list
(similar to %ll) in checkAPIs.pl .


svn path=/trunk/; revision=34120
2010-09-15 14:10:25 +00:00
Bill Meier df29b59def All use of deprecated GtkOptionMenu functions fixed: Error if any usage found.
Warn instead of Error for several deprecated GTK functions used recently
 in Wireshark source (1 GtkCombo function and 2 GtkItemFactory functions).
 (ToDo: replace remaining use of GtkCombo and all use of GtkItemFactory).

svn path=/trunk/; revision=33598
2010-07-20 23:58:56 +00:00
Bill Meier eb232c3954 Add a few deprecated GObject fcns;
Fix some typos and capitalization.

svn path=/trunk/; revision=33254
2010-06-18 22:17:43 +00:00
Bill Meier 459eb4eed7 Add deprecated from GLib 2.24
svn path=/trunk/; revision=33247
2010-06-17 18:12:46 +00:00
Bill Meier e636286b3c Add GTK deprecated from GTK 2.20.
svn path=/trunk/; revision=33246
2010-06-17 17:51:52 +00:00
Jeff Morriss ca2a2b6298 Fix the value_string regexp so it doesn't match value_string_ext (which we don't have to check for NULL termination and the like)
svn path=/trunk/; revision=32937
2010-05-24 22:31:51 +00:00
Anders Broman fc0932168f Run deprecated-gtk-todoon all files in the gtk dir.
svn path=/trunk/; revision=32638
2010-05-02 21:42:53 +00:00
Bill Meier 264d162f8d (Minor): Improve an output message.
svn path=/trunk/; revision=32277
2010-03-25 18:50:31 +00:00
Bill Meier e3fc8e195c gtk_entry_append_text no longer used by Wireshark: Mark as deprecated-gtk ('W" => 'E')
svn path=/trunk/; revision=31387
2009-12-29 19:30:02 +00:00
Bill Meier 06a1aa808c gtk_progress_bar_update no longer used by Wireshark: Mark as deprecated ('W" => 'E').
svn path=/trunk/; revision=31385
2009-12-29 17:50:03 +00:00
Bill Meier 1b15280a40 Mark certain GTK functions now unused by Wireshark as deprecated ("W" ==> 'E');
Rework usage() text slightly;
Clean up whitespace (untabify & etc).

svn path=/trunk/; revision=31381
2009-12-29 15:35:20 +00:00
Bill Meier 5ae2550311 Update GLib/GTK deprecated lists to match current stable Glib/GTK;
Various other minor changes ....

svn path=/trunk/; revision=31374
2009-12-28 20:54:20 +00:00
Jaap Keuter ff810ee91c Following bug 4302 added ctime() to the deprecated list.
svn path=/trunk/; revision=31210
2009-12-08 22:26:04 +00:00
Bill Meier 500a247519 Add some comments about GMemChunk usage;
Enable 'deprecated' checking for some GLib functions 
 Wireshark doesn't currently use.

svn path=/trunk/; revision=30528
2009-10-12 01:38:43 +00:00
Bill Meier c7820529f5 Fix indentation.
svn path=/trunk/; revision=30380
2009-10-07 01:08:13 +00:00
Anders Broman 8fc53b829b Use gtk_image_new_from_pixmap().
svn path=/trunk/; revision=30316
2009-10-04 18:33:23 +00:00
Anders Broman 199330559c Remove #if 0'ed code.
svn path=/trunk/; revision=30312
2009-10-04 18:21:14 +00:00
Anders Broman ecc0cdb162 From GTK docs:
Warning
gtk_window_set_policy is deprecated and should not be used in newly-written code. Use gtk_window_set_resizable() instead.

Changes how a toplevel window deals with its size request and user resize attempts. There are really only two reasonable ways to call this function: 

1.gtk_window_set_policy (GTK_WINDOW (window), FALSE, TRUE, FALSE) means that the window is user-resizable. 

2.gtk_window_set_policy (GTK_WINDOW (window), FALSE, FALSE, TRUE) means that the window's size is program-controlled, and should simply match the current size request of the window's children. 

gtk_window_set_resizable () :
Sets whether the user can resize a window. Windows are user resizable by default.

svn path=/trunk/; revision=30311
2009-10-04 18:11:22 +00:00
Anders Broman fa3b06e9de Get rid of deprecated symblol gtk_widget_draw().
svn path=/trunk/; revision=30305
2009-10-04 15:49:52 +00:00
Gerald Combs c66d0e4a6f Add assert and assert_perror to the 'abort' list.
svn path=/trunk/; revision=28896
2009-06-30 20:28:26 +00:00
Jeff Morriss bbc68754f6 It appears Wireshark now has only ASCII in its source files; Treat non-ASCII chars as an error.
svn path=/trunk/; revision=28738
2009-06-15 15:16:52 +00:00
Bill Meier 899b857400 gtk_exit(): deprecated and no longer used in Wireshark: 'W' ==> 'E'
svn path=/trunk/; revision=28445
2009-05-22 12:39:00 +00:00
Bill Meier e88bdea0bb gtk_check_menu_item_set_show_toggle() is deprecated and not needed.
[show_toggle is always TRUE].

svn path=/trunk/; revision=28292
2009-05-07 14:35:02 +00:00
Anders Broman 2621fbbdf9 Change W->E for now removed functions.
svn path=/trunk/; revision=28279
2009-05-05 18:38:59 +00:00
Bill Meier 866eb54ad4 checkAPIs: check for 'const' in value_string definition.
svn path=/trunk/; revision=28114
2009-04-21 22:26:34 +00:00
Bill Meier 14980f1592 checkAPIs: Add additional GLib deprecated functions;
Update comments.

svn path=/trunk/; revision=28051
2009-04-14 18:22:43 +00:00
Bill Meier b6366d45f3 gtk_label_get() --> gtk_label_get_text() with related code changes;
Also: Fix indentation to be consistent.

svn path=/trunk/; revision=28034
2009-04-11 18:03:11 +00:00
Anders Broman b686f1fa30 Get rid of gtk_file_selection_new and gtk_file_selection_get_filename.
svn path=/trunk/; revision=28032
2009-04-11 14:47:55 +00:00
Bill Meier 3224dc5d7a Remove unnecessary use of (deprecated) gtk_button_box_set_child_ipadding();
(In each case the arg values used [4,0] were the same as the defaults).
checkAPIs.pl: gtk_button_box_set_child_ipadding: 'W' --> 'E'

svn path=/trunk/; revision=28030
2009-04-10 18:31:01 +00:00
Bill Meier ade9f33ac5 gtk_widget_ref: 'W' --> 'E';
Also: Add GTK 2.16.0 deprecated functions

svn path=/trunk/; revision=28028
2009-04-10 14:12:29 +00:00
Bill Meier bd86780397 gtk_set_usize: W --> E;
Change 'usage' to list groups and default groups.

svn path=/trunk/; revision=28020
2009-04-09 13:04:15 +00:00
Anders Broman caa4281da4 gtk_widget_ref() -> g_object_ref()
GTK_SIGNAL_FUNC -> G_CALLBACK()

svn path=/trunk/; revision=28017
2009-04-09 05:51:56 +00:00
Bill Meier 510a52b128 Treat any usage of functions in the 'deprecated' group an an Error.
There's no longer any Wireshark usage of these functions.

svn path=/trunk/; revision=27732
2009-03-15 20:50:33 +00:00
Bill Meier 34515ab429 Add complete list of deprecated GTK API's (as of GTK 2.14.7).
Group 'deprecated-gtk' lists all deprecated GTK APIs which
  are not currently used in Wireshark.
  -g deprecated-gtk will 'Error';

 Group 'deprecated-gtk-todo' lists the deprecated GTK APIs
  which are still used in Wireshark (ie: not yet fixed).
  -g deprecated-gtk-todo will 'Warn'.

Also: two new options added:
 -M: -g output is one line per function per file;
 -s summary-group: gives a count of the usage of each function in that group
    [currently: any group used in -s must also be specified with -g option].
   

svn path=/trunk/; revision=27729
2009-03-15 20:09:25 +00:00
Anders Broman 4602e4850d Add GTK deprecated functions.
svn path=/trunk/; revision=27561
2009-02-27 07:09:25 +00:00
Anders Broman e88a6e5392 Update CheckApi with:
#'gtk_clist_new', should we depriceate?
		# GtkCList has been deprecated since GTK+ 2.0 and should not be used
		# in newly written code. Use GtkTreeView instead. 
		'gtk_file_selection_new',

svn path=/trunk/; revision=27508
2009-02-22 14:47:07 +00:00
Bill Meier 0726ae61dc Search for "(static const|static|const) value_string" when
looking for value_string definitions to validate.

svn path=/trunk/; revision=26026
2008-08-14 23:03:29 +00:00
Jeff Morriss acd338f422 Remove the (long deprecated) proto_tree_add_*_hidden() functions
svn path=/trunk/; revision=25820
2008-07-24 15:35:29 +00:00
Bill Meier a4d1eb9ee9 (Minor) Disable un-needed 'capture' in regexp
svn path=/trunk/; revision=25811
2008-07-23 23:15:07 +00:00
Bill Meier e86d6997c7 Fix double-quoted string regexp to match strings with "line continuation";
Enable value_string check again ....

svn path=/trunk/; revision=25810
2008-07-23 22:50:03 +00:00
Bill Meier d35d95395a Disable value_string check for now.
Apparently the "regex which matches double-quoted strings"
doesn't work with some versions of Perl (eg: 5.8.8) if the
string contains a 'line-continuation' (\ folowed by a new-line).
(This works for Perl 5.10.0).
So: disable value_string check until I look into this further.

svn path=/trunk/; revision=25802
2008-07-23 11:36:27 +00:00
Bill Meier ac48c59340 Add test to check if value_string arrays are NULL terminated;
default: test is enabled.
Check for error return from GetOptions

svn path=/trunk/; revision=25800
2008-07-22 22:27:08 +00:00
Guy Harris b6e20d89be Put printf into a separate "termoutput" API group. For most files,
check for it - but not for TShark plugins, as they are expected to
print to the standard output.

svn path=/trunk/; revision=25653
2008-07-01 21:13:32 +00:00
Gerald Combs b642ef10fa Have checkAPIs.pl print to stderr, so that its output is colored red in
Buildbot. Make capitalization more consistent. Look for abort functions in
wsutil.

svn path=/trunk/; revision=25619
2008-06-27 22:48:25 +00:00
Gerald Combs 83aacf0a09 Add support for "API groups" in checkAPIs.pl. Make the "prohibited"
and "deprecated" groups the default. Add an "abort" group for code that
shouldn't exit the program. Update the makefiles to call "checkAPIs.pl
-g abort" for dissectors. Remove a dependency on "cat" in checkAPIs.pl.

svn path=/trunk/; revision=25614
2008-06-26 22:20:05 +00:00
Jeff Morriss a5cee04fad Move the file utility functions from wiretap to libwsutil so that
libwireshark (and the plugins using those functions) do not depend on
wiretap on Windows.

While doing that, rename the eth_* functions to ws_*.

svn path=/trunk/; revision=25354
2008-05-22 15:46:27 +00:00
Bill Meier 5a43cd6358 Check for a few addt'l functions...
svn path=/trunk/; revision=25341
2008-05-21 14:49:50 +00:00
Jeff Morriss 547cda2f1f Update comments.
svn path=/trunk/; revision=25286
2008-05-13 12:49:32 +00:00
Anders Broman db6d0b9a4c Run checkAPI in plugins dir.
svn path=/trunk/; revision=25259
2008-05-08 18:24:08 +00:00
Anders Broman 9cc9c92e75 Fix some of the Errors/warnings detected by checkapi,
make non ASCII char a warning for now.

svn path=/trunk/; revision=25240
2008-05-05 20:38:27 +00:00
Anders Broman 163d568fe6 Add depreceated glib API:s
svn path=/trunk/; revision=25230
2008-05-05 06:27:15 +00:00
Jeff Morriss 74a602085e Ban strdup() and strndup().
svn path=/trunk/; revision=25045
2008-04-15 12:56:23 +00:00
Jeff Morriss eeaa432e2a Warn if a file does not have an SVN Id tag in it.
svn path=/trunk/; revision=24587
2008-03-08 21:23:14 +00:00
Stig Bjørlykke 34d9fa6c56 Add strncpy and strncat to the list of prohibited APIs.
svn path=/trunk/; revision=24517
2008-03-01 12:04:16 +00:00
Jeff Morriss 068f67a499 Warn if we find %ll in the source
svn path=/trunk/; revision=24182
2008-01-24 22:02:55 +00:00
Jeff Morriss bb66032801 Add check for non-ASCII characters (defined, for now, as any whose value is > 0x80) anywhere in the source files (as per discussion on -dev). Amazingly, this does not appear to slow the tool down too much.
svn path=/trunk/; revision=24177
2008-01-24 18:18:28 +00:00
Jeff Morriss 0e339e83ed Add the file op APIs (e.g., open()) to the list of prhobited APIs (should use the eth_* versions instead).
svn path=/trunk/; revision=24057
2008-01-10 15:03:58 +00:00
Guy Harris c6420ae10b Ban strcasecmp(), strncasecmp(), g_strcasecmp(), and g_strncasecmp()
while we're at it.  More to come....

svn path=/trunk/; revision=23626
2007-11-27 20:06:20 +00:00
Jeff Morriss c641bfb363 When we've found C++ style comments, tell which file we found them in.
svn path=/trunk/; revision=23609
2007-11-26 18:59:32 +00:00
Jeff Morriss 58b8fef9ea As discussed on the -dev list quite a while ago: a small tool to check Wireshark code (or at least parts of it) for "bad" things (C++ style comments and API/function calls that should not be used). I'm checking in because I almost missed some C++ style comments in a file I was contemplating checking in; this tool can help us (at least me) avoid such problems in the future.
svn path=/trunk/; revision=22509
2007-08-15 20:35:14 +00:00