Commit Graph

15 Commits

Author SHA1 Message Date
Kovarththanan Rajaratnam 5417a21bac As pointed out by Guy, we should probably explain why the gulong -> size_t cast is 'safe'
svn path=/trunk/; revision=29458
2009-08-17 20:14:59 +00:00
Kovarththanan Rajaratnam e4e9b91275 Add proper type cast.
Thanks to Martin for reporting this.

svn path=/trunk/; revision=29451
2009-08-17 04:23:47 +00:00
Kovarththanan Rajaratnam 154de60393 Switch over to using GLib's g_malloc/g_free in the name of consistency.
svn path=/trunk/; revision=29430
2009-08-15 09:13:16 +00:00
Gerald Combs 6c99cf5519 From Kovarththanan Rajaratnam via bug 3506:
The exception throwing code in except.c/h should be annotated with
"noreturn" to indicate that they never return. Running static analysis
on Wireshark without this annotation causes a lot of false positives
since these analyzers assume that the exception handling code are
ordinary functions that will eventually return.

svn path=/trunk/; revision=29246
2009-07-30 17:54:58 +00:00
Guy Harris ad1d82b541 Include <glib.h> to declare g_vsnprintf().
svn path=/trunk/; revision=23768
2007-12-05 10:35:37 +00:00
Guy Harris 3af2d0708a Use g_vsnprintf(), not vsprintf(), for safety's sake.
svn path=/trunk/; revision=23766
2007-12-05 10:30:38 +00:00
Ulf Lamping 6f2c4c84c1 Win32: call an existing debugger if a DissectorError is thrown. This preserves the call stack of the bug making debugging much easier.
This can't be done in every error throwing case, as e.g. throwing a ReportedBoundsError might happen a lot even if no bugs are involved. Anyway, extending this to other errors can be done manually while debugging.

svn path=/trunk/; revision=17072
2006-01-22 16:32:45 +00:00
Tomas Kukosa 0539569e1b get rid of warnings about qualifier discarding
svn path=/trunk/; revision=16017
2005-09-27 06:09:14 +00:00
Guy Harris f618b54d36 Support throwing an exception with a null message pointer, and have the
message not be const (as we generate messages with "g_strdup_sprintf()",
which means they need to be freed; using a null message means that we
don't have to use a special string for exceptions with no message, and
don't have to worry about not freeing that).

Have THROW() throw an exception with a null message pointer.  (This
means that you crash if you throw DissectorError with THROW().  Don't do
that - it means you don't get a more detailed explanation of the
dissector problem.  Use the DISSECTOR_ASSERT, etc. macros in
epan/proto.h instead.)

Free the exception message for DissectorError, as it's mallocated.

svn path=/trunk/; revision=15250
2005-08-06 19:58:45 +00:00
Gerald Combs 13fd96b13d Remove some unneeded backslashes.
svn path=/trunk/; revision=12857
2004-12-29 16:25:06 +00:00
Gerald Combs ee11576536 Remove some macros that were making the "splint" utility throw a fit.
svn path=/trunk/; revision=12849
2004-12-28 19:59:50 +00:00
Guy Harris 8a8b883450 Set the svn:eol-style property on all text files to "native", so that
they have LF at the end of the line on UN*X and CR/LF on Windows;
hopefully this means that if a CR/LF version is checked in on Windows,
the CRs will be stripped so that they show up only when checked out on
Windows, not on UN*X.

svn path=/trunk/; revision=11400
2004-07-18 00:24:25 +00:00
Jörg Mayer 48be4e530d Removed trailing whitespaces from .h and .c files using the
winapi_cleanup tool written by Patrik Stridvall for the wine
project.

svn path=/trunk/; revision=6116
2002-08-28 20:41:00 +00:00
Gilbert Ramirez 52d5904afd Fix for Kazlib exception code:
Defect number: 0011
Date: Jul 26 2001
Releases of Kazlib affected: 1.10 through 1.19
Status: Fixed in 1.20
Modules affected: except.c
Description: Members of the except_t structure needed to be declared
    volatile because the structure is automatically allocated in the
    except macro, modified after a setjmp() takes place, and accessed
    after control returns via longjmp.
Solution: Upgrade to 1.20 or backpatch the fix.

svn path=/trunk/; revision=3793
2001-07-27 16:20:39 +00:00
Gilbert Ramirez 83ec54675c First step in moving core Ethereal routines to libepan.
svn path=/trunk/; revision=2458
2000-09-27 04:55:05 +00:00