diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2024-04-24 19:16:12 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2024-04-24 19:16:12 (GMT) |
commit | 90d1f1029649d9e0a4400eb8d90ed443c9145280 (patch) | |
tree | 659fefd9f8461afaf26844784a1a6adc0c6c4ecb /generic | |
parent | 915810280aced25ebdd12f953e7dde6bed493c03 (diff) | |
download | tcl-90d1f1029649d9e0a4400eb8d90ed443c9145280.zip tcl-90d1f1029649d9e0a4400eb8d90ed443c9145280.tar.gz tcl-90d1f1029649d9e0a4400eb8d90ed443c9145280.tar.bz2 |
Improve use of TCL_NORETURN, so no unnecessary warnings are produced any more
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tcl.h | 4 | ||||
-rw-r--r-- | generic/tclPanic.c | 26 |
2 files changed, 15 insertions, 15 deletions
diff --git a/generic/tcl.h b/generic/tcl.h index 90bc0c1..52288ab 100644 --- a/generic/tcl.h +++ b/generic/tcl.h @@ -597,7 +597,7 @@ typedef void (Tcl_FreeProc) (char *blockPtr); #endif typedef int (Tcl_LibraryInitProc) (Tcl_Interp *interp); typedef int (Tcl_LibraryUnloadProc) (Tcl_Interp *interp, int flags); -typedef TCL_NORETURN1 void (Tcl_PanicProc) (const char *format, ...); +typedef void (Tcl_PanicProc) (const char *format, ...); typedef void (Tcl_TcpAcceptProc) (void *callbackData, Tcl_Channel chan, char *address, int port); typedef void (Tcl_TimerProc) (void *clientData); @@ -2312,7 +2312,7 @@ const char * TclTomMathInitializeStubs(Tcl_Interp *interp, const char * TclInitStubTable(const char *version); void * TclStubCall(void *arg); #if defined(_WIN32) - TCL_NORETURN1 void Tcl_ConsolePanic(const char *format, ...); + void Tcl_ConsolePanic(const char *format, ...); #else # define Tcl_ConsolePanic NULL #endif diff --git a/generic/tclPanic.c b/generic/tclPanic.c index 2dd33d2..dcceb25 100644 --- a/generic/tclPanic.c +++ b/generic/tclPanic.c @@ -71,7 +71,7 @@ Tcl_SetPanicProc( */ /* coverity[+kill] */ -void +TCL_NORETURN void Tcl_Panic( const char *format, ...) @@ -104,21 +104,21 @@ Tcl_Panic( fprintf(stderr, "\n"); fflush(stderr); #endif -# if defined(__GNUC__) - __builtin_trap(); -# elif defined(_WIN64) - __debugbreak(); -# elif defined(_MSC_VER) && defined (_M_IX86) - _asm {int 3} -# elif defined(_WIN32) - DebugBreak(); -# endif + } +#if defined(__GNUC__) + __builtin_trap(); +#elif defined(_WIN64) + __debugbreak(); +#elif defined(_MSC_VER) && defined (_M_IX86) + _asm {int 3} +#elif defined(_WIN32) + DebugBreak(); +#endif #if defined(_WIN32) - ExitProcess(1); + ExitProcess(1); #else - abort(); + abort(); #endif - } } /* |