aboutsummaryrefslogtreecommitdiffstats
path: root/epan/except.c
AgeCommit message (Collapse)AuthorFilesLines
2016-07-25Fix checkAPI.pl warnings about printfMichael Mann1-6/+9
Many of the complaints from checkAPI.pl for use of printf are when its embedded in an #ifdef and checkAPI isn't smart enough to figure that out. The other (non-ifdef) use is dumping internal structures (which is a type of debug functionality) Add a "ws_debug_printf" macro for printf to pacify the warnings. Change-Id: I63610e1adbbaf2feffb4ec9d4f817247d833f7fd Reviewed-on: https://code.wireshark.org/review/16623 Reviewed-by: Michael Mann <mmann78@netscape.net> Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-04-08Use a single WS_NORETURN macroPeter Wu1-5/+5
Having to define two macros for marking a function as never returning seems a bit redundant. Merge the MSVC and GCC-like attributes into a single WS_NORETURN. Tested with Clang 3.7.1, GCC 4.4.7 and even GCC 4.1.2 using this small program (-Wall -Wextra, the first two generate warnings for uninitialized variables, the last one compiles without warnings): #include <stdlib.h> __attribute__((noreturn)) void foo() { exit(1); } __attribute__((noreturn)) void bar(); void bar() { exit(1); } int main() { int j, i; if (i) { bar(); return j; } foo(); return j; } Change-Id: I7d19c15e61b8f8fa4936864407199c4109f8cc82 Reviewed-on: https://code.wireshark.org/review/14822 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Guy Harris <guy@alum.mit.edu> Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2015-06-06Print unsigned long values with %lu, not %ld.Guy Harris1-4/+4
Change-Id: Ic437f5ec918c1cd4d39eb27e0a4fafb2a2f4b244 Reviewed-on: https://code.wireshark.org/review/8782 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-02-09(Trivial) Fix printf-related 'Mismatch on sign' warningsBill Meier1-2/+2
Found by MSVC2013 Code Analysis Change-Id: I58063946dd558e98308c87b36eeac0ddbe1a6e79 Reviewed-on: https://code.wireshark.org/review/7045 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-12-28Removed duplicated #include linesDario Lombardo1-1/+0
Change-Id: I9cafa3cd5c74121168777d8c656e7e94e89efd3c Reviewed-on: https://code.wireshark.org/review/6065 Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com> Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-10-20Don't use toupper() in the test program.Guy Harris1-1/+1
We're not including ctype.h in the test program, so don't use toupper(). The test program might not be built with GLib, so don't use g_ascii_toupper(), either. Just compare against both 'Y' and 'y'. Change-Id: Iabc04a5fecb04110c0d16b24a047de72eabbb2bc Reviewed-on: https://code.wireshark.org/review/4870 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-10-17Get rid of unnecessary includes of ctype.h.Guy Harris1-1/+0
Change-Id: Ibb194cd839d174af9c96f7bb1e2941b3dd6c1ce1 Reviewed-on: https://code.wireshark.org/review/4797 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-03-04Remove all $Id$ from top of fileAlexis La Goutte1-2/+0
(Using sed : sed -i '/^ \* \$Id\$/,+1 d') Fix manually some typo (in export_object_dicom.c and crc16-plain.c) Change-Id: I4c1ae68d1c4afeace8cb195b53c715cf9e1227a8 Reviewed-on: https://code.wireshark.org/review/497 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-01-26Fix indent (Use 4spaces) and modelines infoAlexis La Goutte1-79/+92
svn path=/trunk/; revision=54967
2014-01-26Drop support of Visual Studio 2005Alexis La Goutte1-4/+0
* Remove _MSC_VER < 1500 check * Cleanup config.nmake See http://www.wireshark.org/lists/wireshark-dev/201305/msg00159.html svn path=/trunk/; revision=54965
2013-03-20 From beroset:Bill Meier1-1/+1
remove C++ incompatibilities https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416 attachment #10397 svn path=/trunk/; revision=48438
2012-09-20We always HAVE_CONFIG_H so don't bother checking whether we have it or not.Jeff Morriss1-3/+1
svn path=/trunk/; revision=45016
2011-08-01Another fix for building with MSVC2005.Stig Bjørlykke1-0/+4
The previous fixes in r37728 and r37730 did build a wireshark which was unable to use the native windows file dialog (GetOpenFileName). svn path=/trunk/; revision=38299
2011-02-17config.h is now included, and it defines _WIN32_WINNT.Guy Harris1-2/+0
svn path=/trunk/; revision=35992
2011-02-17On Windows, try putting __declspec(noreturn) in front of declarations ofGuy Harris1-5/+9
routines that don't return. (This requires that some files include config.h to get WS_MSVC_NORETURN declared properly.) svn path=/trunk/; revision=35989
2009-10-06Cleanup rcsidsKovarththanan Rajaratnam1-16/+12
svn path=/trunk/; revision=30369
2009-08-17As pointed out by Guy, we should probably explain why the gulong -> size_t ↵Kovarththanan Rajaratnam1-0/+8
cast is 'safe' svn path=/trunk/; revision=29458
2009-08-17Add proper type cast.Kovarththanan Rajaratnam1-1/+1
Thanks to Martin for reporting this. svn path=/trunk/; revision=29451
2009-08-15Switch over to using GLib's g_malloc/g_free in the name of consistency.Kovarththanan Rajaratnam1-2/+2
svn path=/trunk/; revision=29430
2009-07-30From Kovarththanan Rajaratnam via bug 3506:Gerald Combs1-5/+5
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
2007-12-05Include <glib.h> to declare g_vsnprintf().Guy Harris1-0/+3
svn path=/trunk/; revision=23768
2007-12-05Use g_vsnprintf(), not vsprintf(), for safety's sake.Guy Harris1-1/+1
svn path=/trunk/; revision=23766
2006-01-22Win32: call an existing debugger if a DissectorError is thrown. This ↵Ulf Lamping1-0/+13
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
2005-09-27get rid of warnings about qualifier discardingTomas Kukosa1-3/+3
svn path=/trunk/; revision=16017
2005-08-06Support throwing an exception with a null message pointer, and have theGuy Harris1-10/+43
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
2004-12-29Remove some unneeded backslashes.Gerald Combs1-3/+3
svn path=/trunk/; revision=12857
2004-12-28Remove some macros that were making the "splint" utility throw a fit.Gerald Combs1-60/+47
svn path=/trunk/; revision=12849
2004-07-18Set the svn:eol-style property on all text files to "native", so thatGuy Harris1-2/+2
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
2002-08-28Removed trailing whitespaces from .h and .c files using theJörg Mayer1-4/+4
winapi_cleanup tool written by Patrik Stridvall for the wine project. svn path=/trunk/; revision=6116
2001-07-27Fix for Kazlib exception code:Gilbert Ramirez1-4/+4
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
2000-09-27First step in moving core Ethereal routines to libepan.Gilbert Ramirez1-0/+415
svn path=/trunk/; revision=2458