summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2020-10-08 13:33:11 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2020-10-08 13:33:11 (GMT)
commit7bf5af5c220c94675e6cbacf175b2bac28df1432 (patch)
treeab99b02159e20db1cf5de012c85b0dd32d5ec807 /generic
parent92bd8b3a3f380903aa8f6e7221c2d4aba012a88a (diff)
parent4a3369807be6e501ec6452edf99a73514c24d861 (diff)
downloadtcl-7bf5af5c220c94675e6cbacf175b2bac28df1432.zip
tcl-7bf5af5c220c94675e6cbacf175b2bac28df1432.tar.gz
tcl-7bf5af5c220c94675e6cbacf175b2bac28df1432.tar.bz2
Make everything compile warning-free with -Wundef. Put enum ASSEM_DICT_GET_DEF last in TalInstType, so it's binary compatible with Tcl 8.6
Diffstat (limited to 'generic')
-rw-r--r--generic/tclAlloc.c2
-rw-r--r--generic/tclAssembly.c10
-rw-r--r--generic/tclCkalloc.c2
-rw-r--r--generic/tclEvent.c2
-rw-r--r--generic/tclObj.c2
5 files changed, 9 insertions, 9 deletions
diff --git a/generic/tclAlloc.c b/generic/tclAlloc.c
index bc4716d..4a84255 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 2102e84..55fde66 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;
/*
@@ -1266,7 +1266,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 c1a585e..f761521 100644
--- a/generic/tclCkalloc.c
+++ b/generic/tclCkalloc.c
@@ -1288,7 +1288,7 @@ TclFinalizeMemorySubsystem(void)
Tcl_MutexUnlock(ckallocMutexPtr);
#endif
-#if USE_TCLALLOC
+#if defined(USE_TCLALLOC) && USE_TCLALLOC
TclFinalizeAllocSubsystem();
#endif
}
diff --git a/generic/tclEvent.c b/generic/tclEvent.c
index 85f76e3..76a45ae 100644
--- a/generic/tclEvent.c
+++ b/generic/tclEvent.c
@@ -1048,7 +1048,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/tclObj.c b/generic/tclObj.c
index e58206b..6e17141 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