From 976f8a2c8d9cd0b36533fc9d2d5a6341e5386570 Mon Sep 17 00:00:00 2001 From: das Date: Mon, 24 Aug 2009 03:18:23 +0000 Subject: * generic/tkInt.h: Annotate Tcl_Panic as noreturn for clang static analyzer in PURIFY builds, replacing preprocessor/assert technique. --- ChangeLog | 3 +++ generic/tkInt.h | 6 ++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index dc2dff0..ec7f04c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2009-08-24 Daniel Steffen + * generic/tkInt.h: Annotate Tcl_Panic as noreturn for clang static + analyzer in PURIFY builds, replacing preprocessor/assert technique. + * generic/tkBind.c (HandleEventGenerate): Don't generate events for windows that don't exist yet (fixes TkAqua testsuite crash). diff --git a/generic/tkInt.h b/generic/tkInt.h index 958695e..d43278a 100644 --- a/generic/tkInt.h +++ b/generic/tkInt.h @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: $Id: tkInt.h,v 1.107 2009/08/19 23:02:00 pspjuth Exp $ + * RCS: $Id: tkInt.h,v 1.108 2009/08/24 03:18:23 das Exp $ */ #ifndef _TKINT @@ -989,9 +989,7 @@ MODULE_SCOPE Tcl_HashTable tkPredefBitmapTable; #if defined(PURIFY) && defined(__clang__) && !defined(CLANG_ASSERT) #include #define CLANG_ASSERT(x) assert(x) -#define TclPanic Tcl_Panic -#undef Tcl_Panic -#define Tcl_Panic(f, ...) do { TclPanic(f,##__VA_ARGS__); CLANG_ASSERT(0); } while(0) +EXTERN void Tcl_Panic(const char * format, ...) __attribute__((analyzer_noreturn)); #elif !defined(CLANG_ASSERT) #define CLANG_ASSERT(x) #endif -- cgit v0.12