summaryrefslogtreecommitdiffstats
path: root/unix
diff options
context:
space:
mode:
Diffstat (limited to 'unix')
-rw-r--r--unix/tclEpollNotfy.c6
-rw-r--r--unix/tclKqueueNotfy.c6
-rw-r--r--unix/tclSelectNotfy.c12
-rw-r--r--unix/tclUnixFile.c4
-rw-r--r--unix/tclUnixNotfy.c4
-rw-r--r--unix/tclUnixThrd.c8
6 files changed, 35 insertions, 5 deletions
diff --git a/unix/tclEpollNotfy.c b/unix/tclEpollNotfy.c
index bab02ee..649c21b 100644
--- a/unix/tclEpollNotfy.c
+++ b/unix/tclEpollNotfy.c
@@ -820,6 +820,12 @@ TclAsyncNotifier(
*/
pthread_kill((pthread_t) threadId, sigNumber);
+#else
+ (void)sigNumber;
+ (void)threadId;
+ (void)clientData;
+ (void)flagPtr;
+ (void)value;
#endif
return 0;
}
diff --git a/unix/tclKqueueNotfy.c b/unix/tclKqueueNotfy.c
index bc79ddf..2f495bd 100644
--- a/unix/tclKqueueNotfy.c
+++ b/unix/tclKqueueNotfy.c
@@ -816,6 +816,12 @@ TclAsyncNotifier(
*/
pthread_kill((pthread_t) threadId, sigNumber);
+#else
+ (void)sigNumber;
+ (void)threadId;
+ (void)clientData;
+ (void)flagPtr;
+ (void)value;
#endif
return 0;
}
diff --git a/unix/tclSelectNotfy.c b/unix/tclSelectNotfy.c
index f7e61c9..732e4c9 100644
--- a/unix/tclSelectNotfy.c
+++ b/unix/tclSelectNotfy.c
@@ -203,7 +203,9 @@ static Tcl_ThreadId notifierThread;
*/
static sigset_t notifierSigMask;
+#ifndef HAVE_PSELECT
static sigset_t allSigMask;
+#endif /* HAVE_PSELECT */
#endif /* TCL_THREADS */
@@ -279,9 +281,11 @@ extern unsigned char __stdcall TranslateMessage(const MSG *);
* Threaded-cygwin specific constants and functions in this file:
*/
+#if TCL_THREADS && defined(__CYGWIN__)
static const wchar_t className[] = L"TclNotifier";
static unsigned int __stdcall NotifierProc(void *hwnd, unsigned int message,
void *wParam, void *lParam);
+#endif /* TCL_THREADS && defined(__CYGWIN__) */
#ifdef __cplusplus
}
#endif
@@ -594,7 +598,7 @@ TclpDeleteFileHandler(
ckfree(filePtr);
}
-#if defined(__CYGWIN__)
+#if TCL_THREADS && defined(__CYGWIN__)
static unsigned int __stdcall
NotifierProc(
@@ -916,7 +920,7 @@ TclpWaitForEvent(
int
TclAsyncNotifier(
int sigNumber, /* Signal number. */
- Tcl_ThreadId threadId, /* Target thread. */
+ TCL_UNUSED(Tcl_ThreadId), /* Target thread. */
TCL_UNUSED(ClientData), /* Notifier data. */
int *flagPtr, /* Flag to mark. */
int value) /* Value of mark. */
@@ -946,6 +950,10 @@ TclAsyncNotifier(
*/
pthread_kill((pthread_t) notifierThread, sigNumber);
+#else
+ (void)sigNumber;
+ (void)flagPtr;
+ (void)value;
#endif
return 0;
}
diff --git a/unix/tclUnixFile.c b/unix/tclUnixFile.c
index 6cbdec9..998614d 100644
--- a/unix/tclUnixFile.c
+++ b/unix/tclUnixFile.c
@@ -41,10 +41,10 @@ TclpFindExecutable(
{
Tcl_Encoding encoding;
int length;
- wchar_t buf[PATH_MAX];
+ wchar_t buf[PATH_MAX] = L"";
char name[PATH_MAX * 3 + 1];
- GetModuleFileNameW(NULL, buf, sizeof(buf)/sizeof(wchar_t));
+ GetModuleFileNameW(NULL, buf, PATH_MAX);
cygwin_conv_path(3, buf, name, sizeof(name));
length = strlen(name);
if ((length > 4) && !strcasecmp(name + length - 4, ".exe")) {
diff --git a/unix/tclUnixNotfy.c b/unix/tclUnixNotfy.c
index e7e70ef..943e7d7 100644
--- a/unix/tclUnixNotfy.c
+++ b/unix/tclUnixNotfy.c
@@ -105,7 +105,7 @@ StartNotifierThread(
void
TclpAlertNotifier(
- ClientData clientData)
+ void *clientData)
{
#ifdef NOTIFIER_SELECT
#if TCL_THREADS
@@ -120,6 +120,8 @@ TclpAlertNotifier(
pthread_cond_broadcast(&tsdPtr->waitCV);
# endif /* __CYGWIN__ */
pthread_mutex_unlock(&notifierMutex);
+#else
+ (void)clientData;
#endif /* TCL_THREADS */
#else /* !NOTIFIER_SELECT */
ThreadSpecificData *tsdPtr = (ThreadSpecificData *) clientData;
diff --git a/unix/tclUnixThrd.c b/unix/tclUnixThrd.c
index 8a16d0b..aa5926e 100644
--- a/unix/tclUnixThrd.c
+++ b/unix/tclUnixThrd.c
@@ -277,6 +277,11 @@ TclpThreadCreate(
pthread_attr_destroy(&attr);
return result;
#else
+ (void)idPtr;
+ (void)proc;
+ (void)clientData;
+ (void)stackSize;
+ (void)flags;
return TCL_ERROR;
#endif /* TCL_THREADS */
}
@@ -314,6 +319,9 @@ Tcl_JoinThread(
}
return (result == 0) ? TCL_OK : TCL_ERROR;
#else
+ (void)threadId;
+ (void)state;
+
return TCL_ERROR;
#endif
}