summaryrefslogtreecommitdiffstats
path: root/unix/tclUnixFile.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2020-03-09 16:34:46 (GMT)
committerdgp <dgp@users.sourceforge.net>2020-03-09 16:34:46 (GMT)
commitf336629f658f0862b12cd860a4edae8b95449eb2 (patch)
treee38704da3f3289f90c91833bf10a8e91a3699088 /unix/tclUnixFile.c
parent254b4fa35fd51a8b78906d5d481f4e1c3901f8b2 (diff)
parent065483ce8b22e7da470427493d68f36e6a53b80b (diff)
downloadtcl-f336629f658f0862b12cd860a4edae8b95449eb2.zip
tcl-f336629f658f0862b12cd860a4edae8b95449eb2.tar.gz
tcl-f336629f658f0862b12cd860a4edae8b95449eb2.tar.bz2
merge 8.7
Diffstat (limited to 'unix/tclUnixFile.c')
-rw-r--r--unix/tclUnixFile.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/unix/tclUnixFile.c b/unix/tclUnixFile.c
index 83c194a..33628a0 100644
--- a/unix/tclUnixFile.c
+++ b/unix/tclUnixFile.c
@@ -34,17 +34,15 @@ static int NativeMatchType(Tcl_Interp *interp, const char* nativeEntry,
*---------------------------------------------------------------------------
*/
+#ifdef __CYGWIN__
void
TclpFindExecutable(
- const char *argv0) /* The value of the application's argv[0]
- * (native). */
+ TCL_UNUSED(const char *) /*argv0*/)
{
Tcl_Encoding encoding;
-#ifdef __CYGWIN__
size_t length;
wchar_t buf[PATH_MAX];
char name[PATH_MAX * 3 + 1];
- (void)argv0;
GetModuleFileNameW(NULL, buf, PATH_MAX);
cygwin_conv_path(3, buf, name, PATH_MAX);
@@ -56,7 +54,14 @@ TclpFindExecutable(
encoding = Tcl_GetEncoding(NULL, NULL);
TclSetObjNameOfExecutable(
Tcl_NewStringObj(name, length), encoding);
+}
#else
+void
+TclpFindExecutable(
+ const char *argv0) /* The value of the application's argv[0]
+ * (native). */
+{
+ Tcl_Encoding encoding;
const char *name, *p;
Tcl_StatBuf statBuf;
Tcl_DString buffer, nameString, cwd, utfName;
@@ -194,8 +199,8 @@ TclpFindExecutable(
done:
Tcl_DStringFree(&buffer);
-#endif
}
+#endif
/*
*----------------------------------------------------------------------
@@ -1021,9 +1026,8 @@ TclpObjLink(
Tcl_Obj *
TclpFilesystemPathType(
- Tcl_Obj *pathPtr)
+ TCL_UNUSED(Tcl_Obj *))
{
- (void)pathPtr;
/*
* All native paths are of the same type.
*/