summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2009-05-02 12:26:10 +0000
committeroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2009-05-02 12:26:10 +0000
commite69b222d530becf495f9c4e28feff829fbbc72fb (patch)
treec6dff6715f74ac43d1194ca0126b5d108337ea93 /src
parent2fb13f9b6560ce34cb63827e08438028f7a1a123 (diff)
downloadopenocd+libswd-e69b222d530becf495f9c4e28feff829fbbc72fb.tar.gz
openocd+libswd-e69b222d530becf495f9c4e28feff829fbbc72fb.tar.bz2
openocd+libswd-e69b222d530becf495f9c4e28feff829fbbc72fb.tar.xz
openocd+libswd-e69b222d530becf495f9c4e28feff829fbbc72fb.zip
Zach Welch <zw@superlucidity.net> fix warnings
git-svn-id: svn://svn.berlios.de/openocd/trunk@1589 b42882b7-edfa-0310-969c-e2dbd0fdcd60
Diffstat (limited to 'src')
-rw-r--r--src/helper/jim.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/helper/jim.c b/src/helper/jim.c
index 5da0aa11..ad2d6ec5 100644
--- a/src/helper/jim.c
+++ b/src/helper/jim.c
@@ -89,7 +89,7 @@
#endif /* WIN32 */
#endif /* JIM_DYNLIB */
-#ifndef WIN32
+#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
@@ -118,7 +118,7 @@ static void JimChangeCallFrameId(Jim_Interp *interp, Jim_CallFrame *cf);
static void JimFreeCallFrame(Jim_Interp *interp, Jim_CallFrame *cf, int flags);
static void JimRegisterCoreApi(Jim_Interp *interp);
-static Jim_HashTableType JimVariablesHashTableType;
+static Jim_HashTableType *getJimVariablesHashTableType(void);
/* -----------------------------------------------------------------------------
* Utility functions
@@ -3237,7 +3237,7 @@ int Jim_CreateProcedure(Jim_Interp *interp, const char *cmdName,
Jim_ListLength(interp, staticsListObjPtr, &len);
if (len != 0) {
cmdPtr->staticVars = Jim_Alloc(sizeof(Jim_HashTable));
- Jim_InitHashTable(cmdPtr->staticVars, &JimVariablesHashTableType,
+ Jim_InitHashTable(cmdPtr->staticVars, getJimVariablesHashTableType(),
interp);
for (i = 0; i < len; i++) {
Jim_Obj *objPtr, *initObjPtr, *nameObjPtr;
@@ -3440,6 +3440,11 @@ static Jim_HashTableType JimVariablesHashTableType = {
JimVariablesHTValDestructor /* val destructor */
};
+static Jim_HashTableType *getJimVariablesHashTableType(void)
+{
+ return &JimVariablesHashTableType;
+}
+
/* -----------------------------------------------------------------------------
* Variable object
* ---------------------------------------------------------------------------*/