Commit Graph

32 Commits

Author SHA1 Message Date
Guy Harris 8482173e5a Make some variables size_t, as values of that width are assigned to it.
(I'd say "as values of that *type* are assigned to it", but the "len"
field of a GString is of type "gsize", and, for some unknown reason, the
GLib folks, rather than just using size_t, which is required by C89 to
be available, invented their own "gsize" type, defined as "long", which
happens to be narrower than "size_t" on LLP64 platforms such as 64-bit
Windows.  Sigh....)

This squelches some compiler warnings.

Change-Id: Ifca1300297b2e9b777fb2c426dda822ba157cfe5
Reviewed-on: https://code.wireshark.org/review/4014
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-09-06 18:45:53 +00:00
Dario Lombardo 627de38a80 Removed SVN Id from epan dir.
Change-Id: I487a3451344796447f0d5621b993cc89c29e93b5
Reviewed-on: https://code.wireshark.org/review/2383
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-19 19:46:22 +00:00
Gerald Combs 02eea9378e More shorten-64-to-32 warnings.
svn path=/trunk/; revision=54106
2013-12-14 19:23:34 +00:00
Anders Broman 5a85b7fed2 [-Wmissing-prototypes]
Use explicit casts.

svn path=/trunk/; revision=48338
2013-03-16 08:52:09 +00:00
Guy Harris ebacca89a7 Add %option noinput to a bunch of Flex files, as we aren't using the
input() routine and thus don't need to have it generated - and as it
produces warnings of a routine defined but not used, we don't want to
have it generated.

Squelch a casting-const-away warning.

svn path=/trunk/; revision=47613
2013-02-10 19:13:07 +00:00
Guy Harris e92f2f398d Constify the name member of a struct _proto_xmlpi_attr, to squelch
warnings.

svn path=/trunk/; revision=47561
2013-02-08 09:09:29 +00:00
Bill Meier b9f950e33f Fix several [-Wshadow] warnings;
svn path=/trunk/; revision=46194
2012-11-26 01:30:41 +00:00
Bill Meier 37bab5e89d Replace use of deprecated g_strdown() by g_ascii_strdown();
Found when compiling with -DG_DISABLE_DEPRECATED

svn path=/trunk/; revision=38469
2011-08-11 03:10:11 +00:00
Gerald Combs 15f33eecbf Disable warnings-as-errors for Flex-generated output. Add a couple of gsize
casts.

svn path=/trunk/; revision=28002
2009-04-08 18:08:25 +00:00
Luis Ontanon 42c3239a1a luis.ontanon@gmail.com => luis@ontanon.org
svn path=/trunk/; revision=25937
2008-08-05 21:03:46 +00:00
Bill Meier fe5c2d9820 g_string_sprintf --> g_string_printf and g_string_sprintfa --> g_string_append_printf
svn path=/trunk/; revision=25276
2008-05-11 18:33:49 +00:00
Guy Harris a6815b1070 All versions of GLib 2.x come with g_ascii_strcasecmp(), and we require
GLib 2.x; we don't have to check for its presence and supply a
replacement if it's missing.

Get rid of an unremoved reference in epan/dtd_parse.l.

svn path=/trunk/; revision=25197
2008-04-29 16:24:22 +00:00
Bill Meier 0d4b874b44 Bug 2493: Fix (Part 2):
To prevent Windows compiler errors when using flex 2.5.35.
 Fixes "missing unistd.h" and yywrap "mismatched parameter" warnings
 [Upcoming Part 3: ignore 'signed /unsigned mismatch' errors]

svn path=/trunk/; revision=25173
2008-04-25 17:40:29 +00:00
Guy Harris 9c89cdaaa3 strcasecmp(), strncasecmp(), g_strcasecmp(), and g_strncasecmp() delenda
est.  Use g_ascii_strcasecmp() and g_ascii_strncasecmp(), and supply our
own versions if they're missing from GLib (as is the case with GLib
1.x).

In the code to build the list of named fields for Diameter, don't use
g_strdown(); do our own g_ascii_-style upper-case to lower-case mapping
in the hash function and use g_ascii_strcasecmp() in the compare
function.

We do this because there is no guarantee that toupper(), tolower(), and
functions that use them will, for example, map between "I" and "i" in
all locales; in Turkish locales, for example, there are, in both
upper case and lower case, versions of "i" with and without a dot, and
the upper-case version of "i" is "I"-with-a-dot and the lower-case
version of "I" is "i"-without-a-dot.  This causes strings that should
match not to match.

This finishes fixing bug 2010 - an earlier checkin prevented the crash
(as there are other ways to produce the same crash, e.g. a bogus
dictionary.xml file), but didn't fix the case-insensitive string matching.

svn path=/trunk/; revision=23623
2007-11-27 18:52:51 +00:00
Guy Harris 5be4499ad1 Add a script as a front-end for Flex, to work around various problems,
such as the fact that Flex strips all but the last component of the "-o"
argument, and that it doesn't generate a header file to declare routines
the generated lexical analyzer defines.  Use that script when building
lexical analyzers, and, for each lexical analyzer, include the generated
header file in the generated analyzer.

svn path=/trunk/; revision=22446
2007-08-04 02:13:52 +00:00
Guy Harris 968d363f11 Add comments to various %option items to explain what they're doing.
Move the %options to the beginning if they weren't already there, and
put them in the same order in all files.

Add "prefix=" options to .l files that don't already have them, so we
don't have to pass a "-P" option.

Add "never-interactive" and "noyywrap" options to our lexical analyzers,
to remove extra isatty() checks and to eliminate the need for yywrap()
from the Flex library.

Get rid of %option nostdinit - that's the default.

Add .l.c: rules to Makefile.am files, replacing the rules for specific
.l files.  Have those rules all check that $(LEX) is set.

Update the address for the FSF.

svn path=/trunk/; revision=22424
2007-07-30 20:22:37 +00:00
Luis Ontanon 27556d141a two minor leaks
svn path=/trunk/; revision=20443
2007-01-15 20:14:00 +00:00
Luis Ontanon ca6a9a7d13 solve both issues pointed out in:
http://wireshark.org/lists/ethereal-dev/200605/msg02351.html

- dtd_parse.l:
   be more liberal on what a name can be (a number now can be a name)

- packet-xml.c
  if proto-name is given use it instead of the root element name as prefix for generated fields


svn path=/trunk/; revision=19903
2006-11-15 18:40:37 +00:00
Luis Ontanon a472c767a2 a better regex for names in DTDs
svn path=/trunk/; revision=18795
2006-07-26 22:54:48 +00:00
Luis Ontanon ba3a83a475 allow for some uppercasing in names.
"fix" for Bug 1010


svn path=/trunk/; revision=18773
2006-07-20 17:23:58 +00:00
Anders Broman 9aa99b16fe Ethereal->Wireshark
svn path=/trunk/; revision=18248
2006-05-29 20:44:06 +00:00
Ronnie Sahlberg f0b33a4789 ethereal->wireshark updates
svn path=/trunk/; revision=18206
2006-05-22 08:14:01 +00:00
Ronnie Sahlberg 89f022b12b name change
svn path=/trunk/; revision=18197
2006-05-21 05:12:17 +00:00
Luis Ontanon 770aa5678b "./dtd_parse.l", line 167: warning, rule cannot be matched
the . matches one char as {special_char} does so {special_char} won't have been matched. change that for a non ">"

svn path=/trunk/; revision=16153
2005-10-07 08:36:23 +00:00
Luis Ontanon f1b498587b remove location from dtd_build_data_t avoiding to (double) free it.
svn path=/trunk/; revision=16147
2005-10-06 22:01:52 +00:00
Luis Ontanon 3cf75fd6bb get rid of most dtd leaks.
There's just one left I'm aware of (the doctype name).


svn path=/trunk/; revision=15990
2005-09-24 19:03:35 +00:00
Guy Harris d90a1a4ac6 Make the private variables for various lexical analyzers static, so
that we don't have all the lexical analyzers in libethereal share them
(note that they're already static in radius_dict.l, so they weren't
sharing with any other lexical analyzer), and so that OS X 10.3.9's
run-time linker doesn't get upset at finding them defined in libethereal
and the MATE plugin.

Fix up indentation.

svn path=/trunk/; revision=15961
2005-09-22 18:39:25 +00:00
Gerald Combs 5cb2a5e162 Fix a couple of errors found by valgrind.
svn path=/trunk/; revision=15900
2005-09-20 17:24:23 +00:00
Luis Ontanon c943320721 avoid freeing the last location twice.
add some #ifed out code to help debugging the parser


svn path=/trunk/; revision=15884
2005-09-20 00:31:53 +00:00
Luis Ontanon 4c14b12c25 Because there's more than just text in XML...
DTDs are imported to create fields


svn path=/trunk/; revision=15851
2005-09-17 17:05:46 +00:00
Guy Harris 019ed9005f Add a header file to declare routines defined in lexer and used in
parser, or vice versa.

svn path=/trunk/; revision=15769
2005-09-12 19:32:35 +00:00
Luis Ontanon 96326c0b86 the dtd parser (still missing the glue) and few fixes to packet-xml.c
svn path=/trunk/; revision=15745
2005-09-10 17:29:15 +00:00