Commit Graph

46 Commits

Author SHA1 Message Date
Sam Lantinga
a9072159b2 Updated copyright for 2018 2018-01-03 10:03:25 -08:00
Ozkan Sezer
76c361ed7e Watcom supports __FUNCTION__ identifier (and surely not __PRETTY_FUNCTION__)
Partially fixes Bugzilla #3758.
2017-08-17 21:35:46 -04:00
Ozkan Sezer
aadd33a721 SDL_assert.h: add inline asm (int $3) as SDL_TriggerBreakpoint for Watcom/x86
(also disable SIGTRAP case to !watcom, because watcom doesn't have SIGTRAP.)

Partially fixes Bugzilla #3758.
2017-08-17 21:32:42 -04:00
Ryan C. Gordon
faea0af98d assert: Check for Clang _and_ GCC, in case they ever drop compatibility. 2017-05-19 14:49:16 -04:00
Sam Lantinga
d77ab77a7a Updated copyright for 2017 2017-01-01 18:33:28 -08:00
Sam Lantinga
9cc7ce9008 Renaming of guard header names to quiet -Wreserved-id-macro
Patch contributed by Sylvain
2016-11-20 21:34:54 -08:00
Sam Lantinga
d20b74a060 Fixed a few warnings that show up with -Wdocumentation and -Wdocumentation-unknown-command, patch contributed by Sylvain 2016-11-20 21:26:56 -08:00
Sam Lantinga
255c182471 Updated copyright to 2016 2016-01-02 10:10:34 -08:00
Sam Lantinga
78f2198e6c Updated the copyright year to 2015 2015-05-26 06:27:46 -07:00
Ryan C. Gordon
7c14914a5b Do the "fix" for asserts with MSVC's /W4 warnings only on MSVC.
Naturally, this way generates a warning on GCC and Clang instead.  :)
2015-04-07 23:40:01 -04:00
Ryan C. Gordon
19347bf564 Another attempt to make MSVC's /W4 warning level cooperate with SDL_assert.
Fixes Bugzilla #2733.
2015-04-07 00:39:16 -04:00
Ryan C. Gordon
8b9d1a4a4a Fixed naming conventions in some SDL_assert types, added compat #defines.
Fixes Bugzilla #1997.
2015-02-21 00:33:25 -05:00
Ryan C. Gordon
d9bca52776 Changed local var names in SDL assert macro.
Otherwise, if someone added an assert to a function that has a variable
named "state", the compiler might warn about shadowing a local.
2014-07-28 10:54:25 -04:00
Gabriel Jacobo
01a18871e3 Chrome's Native Client backend implementation 2014-06-06 15:45:59 -03:00
Ryan C. Gordon
a18eec16cc Make non-Clang compilers happy. 2014-02-07 11:55:13 -05:00
Ryan C. Gordon
241fc337a8 Tell Clang's static analysis that SDL_assert() is an assertion handler.
This lets it know, for example, that when you do this...

    SDL_assert(ptr != NULL);

...that (ptr) is definitely not NULL at this point in the program, for the
sake of static analysis. While a buggy program could definitely trigger this
assertion, Clang assumes your assertion check is covering it and won't
report possible NULL dereferences after this point.

Since SDL_assert might continue if the user clicks "ignore", without this
change Clang would notice you checked for NULL (meaning that NULL is a real
possibility here) and still wrote code outside of that test branch that
dereferences the pointer, and thus would always trigger false positives.

Static analysis is fun!
2014-02-07 11:52:35 -05:00
Ryan C. Gordon
bbe5c7aaee Added SDL_GetAssertionHandler() and SDL_GetDefaultAssertionHandler(). 2014-02-04 11:38:40 -05:00
Sam Lantinga
dba255c1e5 Fixed bug 2374 - Update copyright for 2014...
Is it that time already??
2014-02-02 00:53:27 -08:00
Ryan C. Gordon
4ec784c0d5 Workaround for compiling with /W4 warnings on Visual C++. 2013-09-07 13:57:20 -04:00
Ryan C. Gordon
0669807485 Added SDL_assert_always (never disabled). 2013-08-20 14:17:48 -04:00
Sam Lantinga
0d9b661db8 File style cleanup for the SDL 2.0 release 2013-05-18 14:17:52 -07:00
Sam Lantinga
019c60c1e8 Happy New Year! 2013-02-15 08:47:44 -08:00
Ryan C. Gordon
7007dc6ac2 Patched to compile when SDL_ASSERT_LEVEL is zero. 2012-12-18 06:35:49 -05:00
Ryan C. Gordon
b3b40aac16 Removed Windows CE support from SDL 2.0.
It's a long-dead platform, and we don't have any way to build for, test, or
maintain it, so there's no sense in doing acrobatics to support it.

If you need Windows CE support, use SDL 1.2. If you need Windows Phone support,
send SDL 2.0 patches for the newer Windows Mobile platform.
2012-09-15 10:59:39 -04:00
Sam Lantinga
e256711bb9 Happy New Year! 2011-12-31 09:28:07 -05:00
Ryan C. Gordon
8f50763692 Fixed -pedantic warning in SDL_assert.h.
Fixes Bugzilla #1282.
2011-08-21 12:36:55 -04:00
Ryan C. Gordon
a74c9aa88d Fixed gcc warnings for apps using SDL headers with -Wundef flag.
Fixes Bugzilla #1216.

Thanks to Dimitris Zenios for the patch!
2011-06-06 12:20:04 -04:00
Ryan C. Gordon
1b953ac714 Removed assertion list terminator (just do it like a normal linked list). 2011-04-19 14:12:56 -04:00
Sam Lantinga
37865236cc Minor missing parameter name 2011-04-18 12:20:30 -07:00
Sam Lantinga
6196aa221e SDL 1.3 is now under the zlib license. 2011-04-08 13:03:26 -07:00
Sam Lantinga
a99d79de70 Fixed error because intrin.h contains C++ code and can't be included in an extern "C" block. 2011-03-15 19:37:38 -07:00
Sam Lantinga
a2cdcf5486 Happy 2011! :) 2011-02-11 22:37:15 -08:00
Sam Lantinga
ec39fffe84 Fixed compiling on Windows Mobile SDK 5.0 with Visual Studio 2008 2011-01-24 15:46:11 -08:00
Sam Lantinga
a4445e1512 Use the portable intrinsic 2011-01-17 13:52:40 -08:00
Sam Lantinga
7052036491 Fixed bug #926
Updated copyright to LGPL version 2.1 and year 2010
2010-01-24 21:10:53 +00:00
Ryan C. Gordon
62b6ab68d0 Clean up assertion API for public use. 2010-01-13 19:29:33 +00:00
Ryan C. Gordon
adbfb16246 Friendly warning comment. 2010-01-13 16:21:26 +00:00
Ryan C. Gordon
e7c41b8a1b Whitespace tweak. 2010-01-13 16:10:25 +00:00
Ryan C. Gordon
e6b26beb4e Fixed comment. 2010-01-13 16:09:27 +00:00
Sam Lantinga
056bd9865b Moved SDL_FUNCTION out so it's always available, and added SDL_FILE and SDL_LINE 2010-01-13 08:25:16 +00:00
Sam Lantinga
8b4a9fce45 Allow configure to override assertion settings, but by default this comes from the build optimization level. 2010-01-13 08:06:32 +00:00
Sam Lantinga
0db463843f Automatically figure out the appropriate assertion level 2010-01-13 07:52:53 +00:00
Sam Lantinga
8e978babaa Fixed release level assertions 2010-01-13 07:36:00 +00:00
Sam Lantinga
2936f4a45d Check for signal.h before using it, don't assume unix is available or required 2010-01-13 07:32:25 +00:00
Sam Lantinga
a112207d03 The config sets the default assertion level so people can override it for their own use in application code. 2010-01-13 07:25:28 +00:00
Sam Lantinga
5f76c6b2d5 First pass at Ryan's assertion code, minor tweaks to come. 2010-01-13 06:47:17 +00:00