diff options
-rw-r--r-- | generic/tclAlloc.c | 2 | ||||
-rw-r--r-- | generic/tclAssembly.c | 10 | ||||
-rw-r--r-- | generic/tclCkalloc.c | 2 | ||||
-rw-r--r-- | generic/tclCmdAH.c | 4 | ||||
-rw-r--r-- | generic/tclEvent.c | 2 | ||||
-rw-r--r-- | generic/tclFileName.c | 3 | ||||
-rw-r--r-- | generic/tclMain.c | 4 | ||||
-rw-r--r-- | generic/tclObj.c | 2 | ||||
-rw-r--r-- | generic/tclParse.c | 4 | ||||
-rwxr-xr-x | unix/configure | 2 | ||||
-rw-r--r-- | unix/tcl.m4 | 2 | ||||
-rwxr-xr-x | win/configure | 2 | ||||
-rw-r--r-- | win/tcl.m4 | 2 | ||||
-rw-r--r-- | win/tclWinPort.h | 6 |
14 files changed, 24 insertions, 23 deletions
diff --git a/generic/tclAlloc.c b/generic/tclAlloc.c index ebe1ec2..9291826 100644 --- a/generic/tclAlloc.c +++ b/generic/tclAlloc.c @@ -24,7 +24,7 @@ #include "tclInt.h" #if !TCL_THREADS || !defined(USE_THREAD_ALLOC) -#if USE_TCLALLOC +#if defined(USE_TCLALLOC) && USE_TCLALLOC /* * We should really make use of AC_CHECK_TYPE(caddr_t) here, but it can wait diff --git a/generic/tclAssembly.c b/generic/tclAssembly.c index 81d06cc..b1bd848 100644 --- a/generic/tclAssembly.c +++ b/generic/tclAssembly.c @@ -131,7 +131,7 @@ enum BasicBlockFlags { * Source instruction type recognized by the assembler. */ -typedef enum TalInstType { +typedef enum { ASSEM_1BYTE, /* Fixed arity, 1-byte instruction */ ASSEM_BEGIN_CATCH, /* Begin catch: one 4-byte jump offset to be * converted to appropriate exception @@ -145,8 +145,6 @@ typedef enum TalInstType { * 1 */ ASSEM_DICT_GET, /* 'dict get' and related - consumes N+1 * operands, produces 1, N > 0 */ - ASSEM_DICT_GET_DEF, /* 'dict getwithdefault' - consumes N+2 - * operands, produces 1, N > 0 */ ASSEM_DICT_SET, /* specifies key count and LVT index, consumes * N+1 operands, produces 1, N > 0 */ ASSEM_DICT_UNSET, /* specifies key count and LVT index, consumes @@ -189,8 +187,10 @@ typedef enum TalInstType { * produces N */ ASSEM_SINT1, /* One 1-byte signed-integer operand * (INCR_STK_IMM) */ - ASSEM_SINT4_LVT4 /* Signed 4-byte integer operand followed by + ASSEM_SINT4_LVT4, /* Signed 4-byte integer operand followed by * LVT entry. Fixed arity */ + ASSEM_DICT_GET_DEF /* 'dict getwithdefault' - consumes N+2 + * operands, produces 1, N > 0 */ } TalInstType; /* @@ -1264,7 +1264,7 @@ AssembleOneLine( Tcl_Obj* instNameObj; /* Name of the instruction */ int tblIdx; /* Index in TalInstructionTable of the * instruction */ - enum TalInstType instType; /* Type of the instruction */ + TalInstType instType; /* Type of the instruction */ Tcl_Obj* operand1Obj = NULL; /* First operand to the instruction */ const char* operand1; /* String rep of the operand */ diff --git a/generic/tclCkalloc.c b/generic/tclCkalloc.c index e37d0b8..5951cf0 100644 --- a/generic/tclCkalloc.c +++ b/generic/tclCkalloc.c @@ -1290,7 +1290,7 @@ TclFinalizeMemorySubsystem(void) Tcl_MutexUnlock(ckallocMutexPtr); #endif -#if USE_TCLALLOC +#if defined(USE_TCLALLOC) && USE_TCLALLOC TclFinalizeAllocSubsystem(); #endif } diff --git a/generic/tclCmdAH.c b/generic/tclCmdAH.c index 4d25d0b..15669be 100644 --- a/generic/tclCmdAH.c +++ b/generic/tclCmdAH.c @@ -59,7 +59,7 @@ static int GetStatBuf(Tcl_Interp *interp, Tcl_Obj *pathPtr, static const char * GetTypeFromMode(int mode); static int StoreStatData(Tcl_Interp *interp, Tcl_Obj *varName, Tcl_StatBuf *statPtr); -static inline int EachloopCmd(Tcl_Interp *interp, int collect, +static int EachloopCmd(Tcl_Interp *interp, int collect, int objc, Tcl_Obj *const objv[]); static Tcl_NRPostProc CatchObjCmdCallback; static Tcl_NRPostProc ExprCallback; @@ -2463,7 +2463,7 @@ TclNRLmapCmd( return EachloopCmd(interp, TCL_EACH_COLLECT, objc, objv); } -static inline int +static int EachloopCmd( Tcl_Interp *interp, /* Our context for variables and script * evaluation. */ diff --git a/generic/tclEvent.c b/generic/tclEvent.c index 13501b3..22ea3d5 100644 --- a/generic/tclEvent.c +++ b/generic/tclEvent.c @@ -1037,7 +1037,7 @@ Tcl_InitSubsystems(void) TclInitThreadStorage(); /* Creates hash table for * thread local storage */ -#if USE_TCLALLOC +#if defined(USE_TCLALLOC) && USE_TCLALLOC TclInitAlloc(); /* Process wide mutex init */ #endif #if TCL_THREADS && defined(USE_THREAD_ALLOC) diff --git a/generic/tclFileName.c b/generic/tclFileName.c index 5e3e44a..bab3f90 100644 --- a/generic/tclFileName.c +++ b/generic/tclFileName.c @@ -587,7 +587,8 @@ Tcl_SplitPath( * plus the argv pointers and the terminating NULL pointer. */ - *argvPtr = (const char **)Tcl_Alloc((((*argcPtr) + 1) * sizeof(char *)) + size); + *argvPtr = (const char **)Tcl_Alloc( + ((((*argcPtr) + 1) * sizeof(char *)) + size)); /* * Position p after the last argv pointer and copy the contents of the diff --git a/generic/tclMain.c b/generic/tclMain.c index 0eea074..89bb8ec 100644 --- a/generic/tclMain.c +++ b/generic/tclMain.c @@ -43,7 +43,7 @@ # define _tcscmp strcmp #endif -static inline Tcl_Obj * +static Tcl_Obj * NewNativeObj( TCHAR *string) { @@ -53,7 +53,7 @@ NewNativeObj( Tcl_DStringInit(&ds); Tcl_WCharToUtfDString(string, -1, &ds); #else - Tcl_ExternalToUtfDString(NULL, (char *) string, -1, &ds); + Tcl_ExternalToUtfDString(NULL, (char *)string, -1, &ds); #endif return TclDStringToObj(&ds); } diff --git a/generic/tclObj.c b/generic/tclObj.c index e52098c..eeaf936 100644 --- a/generic/tclObj.c +++ b/generic/tclObj.c @@ -161,7 +161,7 @@ typedef struct PendingObjData { static PendingObjData pendingObjData; #define ObjInitDeletionContext(contextPtr) \ PendingObjData *const contextPtr = &pendingObjData -#elif HAVE_FAST_TSD +#elif defined(HAVE_FAST_TSD) static __thread PendingObjData pendingObjData; #define ObjInitDeletionContext(contextPtr) \ PendingObjData *const contextPtr = &pendingObjData diff --git a/generic/tclParse.c b/generic/tclParse.c index b821fa0..7bb92d5 100644 --- a/generic/tclParse.c +++ b/generic/tclParse.c @@ -119,7 +119,7 @@ const char tclCharTypeTable[] = { * Prototypes for local functions defined in this file: */ -static inline int CommandComplete(const char *script, size_t numBytes); +static int CommandComplete(const char *script, size_t numBytes); static size_t ParseComment(const char *src, size_t numBytes, Tcl_Parse *parsePtr); static int ParseTokens(const char *src, size_t numBytes, int mask, @@ -2398,7 +2398,7 @@ TclSubstTokens( *---------------------------------------------------------------------- */ -static inline int +static int CommandComplete( const char *script, /* Script to check. */ size_t numBytes) /* Number of bytes in script. */ diff --git a/unix/configure b/unix/configure index bb4f245..c5ccc87 100755 --- a/unix/configure +++ b/unix/configure @@ -5036,7 +5036,7 @@ fi if test "$GCC" = yes; then : CFLAGS_OPTIMIZE=-O2 - CFLAGS_WARNING="-Wall -Wextra -Wshadow -Wwrite-strings -Wpointer-arith" + CFLAGS_WARNING="-Wall -Wextra -Wshadow -Wundef -Wwrite-strings -Wpointer-arith" case "${CC}" in *++|*++-*) ;; diff --git a/unix/tcl.m4 b/unix/tcl.m4 index ea27408..a9ee2d3 100644 --- a/unix/tcl.m4 +++ b/unix/tcl.m4 @@ -966,7 +966,7 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [ CFLAGS_DEBUG=-g AS_IF([test "$GCC" = yes], [ CFLAGS_OPTIMIZE=-O2 - CFLAGS_WARNING="-Wall -Wextra -Wshadow -Wwrite-strings -Wpointer-arith" + CFLAGS_WARNING="-Wall -Wextra -Wshadow -Wundef -Wwrite-strings -Wpointer-arith" case "${CC}" in *++|*++-*) ;; diff --git a/win/configure b/win/configure index 087778c..8dd03e3 100755 --- a/win/configure +++ b/win/configure @@ -4195,7 +4195,7 @@ $as_echo "using shared flags" >&6; } CFLAGS_DEBUG=-g CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer" - CFLAGS_WARNING="-Wall -Wextra -Wshadow -Wwrite-strings -Wpointer-arith" + CFLAGS_WARNING="-Wall -Wextra -Wshadow -Wundef -Wwrite-strings -Wpointer-arith" LDFLAGS_DEBUG= LDFLAGS_OPTIMIZE= @@ -673,7 +673,7 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [ CFLAGS_DEBUG=-g CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer" - CFLAGS_WARNING="-Wall -Wextra -Wshadow -Wwrite-strings -Wpointer-arith" + CFLAGS_WARNING="-Wall -Wextra -Wshadow -Wundef -Wwrite-strings -Wpointer-arith" LDFLAGS_DEBUG= LDFLAGS_OPTIMIZE= diff --git a/win/tclWinPort.h b/win/tclWinPort.h index ceb68c8..78559f5 100644 --- a/win/tclWinPort.h +++ b/win/tclWinPort.h @@ -297,7 +297,7 @@ typedef DWORD_PTR * PDWORD_PTR; * defined in header files above. */ -#if TCL_UNION_WAIT +#ifdef TCL_UNION_WAIT # define WAIT_STATUS_TYPE union wait #else # define WAIT_STATUS_TYPE int @@ -439,10 +439,10 @@ typedef DWORD_PTR * PDWORD_PTR; * Define pid_t and uid_t if they're not already defined. */ -#if ! TCL_PID_T +#if !defined(TCL_PID_T) # define pid_t int #endif /* !TCL_PID_T */ -#if ! TCL_UID_T +#if !defined(TCL_UID_T) # define uid_t int #endif /* !TCL_UID_T */ |