summaryrefslogtreecommitdiffstats
path: root/unix/tclUnixFCmd.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/tclUnixFCmd.c
parent254b4fa35fd51a8b78906d5d481f4e1c3901f8b2 (diff)
parent065483ce8b22e7da470427493d68f36e6a53b80b (diff)
downloadtcl-f336629f658f0862b12cd860a4edae8b95449eb2.zip
tcl-f336629f658f0862b12cd860a4edae8b95449eb2.tar.gz
tcl-f336629f658f0862b12cd860a4edae8b95449eb2.tar.bz2
merge 8.7
Diffstat (limited to 'unix/tclUnixFCmd.c')
-rw-r--r--unix/tclUnixFCmd.c44
1 files changed, 17 insertions, 27 deletions
diff --git a/unix/tclUnixFCmd.c b/unix/tclUnixFCmd.c
index 1e2156c..b97c6ca 100644
--- a/unix/tclUnixFCmd.c
+++ b/unix/tclUnixFCmd.c
@@ -1233,16 +1233,13 @@ TraversalCopy(
static int
TraversalDelete(
Tcl_DString *srcPtr, /* Source pathname (native). */
- Tcl_DString *dummy, /* Destination pathname (not used). */
- const Tcl_StatBuf *statBufPtr,
- /* Stat info for file specified by srcPtr. */
+ TCL_UNUSED(Tcl_DString *),
+ TCL_UNUSED(const Tcl_StatBuf *),
int type, /* Reason for call - see TraverseUnixTree(). */
Tcl_DString *errorPtr) /* If non-NULL, uninitialized or free DString
* filled with UTF-8 name of file causing
* error. */
{
- (void)dummy;
- (void)statBufPtr;
switch (type) {
case DOTREE_F:
@@ -1285,14 +1282,17 @@ TraversalDelete(
static int
CopyFileAtts(
- const char *src, /* Path name of source file (native). */
+#ifdef MAC_OSX_TCL
+ const char *src, /* Path name of source file (native). */
+#else
+ TCL_UNUSED(const char *) /*src*/,
+#endif
const char *dst, /* Path name of target file (native). */
const Tcl_StatBuf *statBufPtr)
/* Stat info for source file */
{
struct utimbuf tval;
mode_t newMode;
- (void)src;
newMode = statBufPtr->st_mode
& (S_ISUID | S_ISGID | S_IRWXU | S_IRWXG | S_IRWXO);
@@ -1344,14 +1344,13 @@ CopyFileAtts(
static int
GetGroupAttribute(
Tcl_Interp *interp, /* The interp we are using for errors. */
- int objIndex, /* The index of the attribute. */
+ TCL_UNUSED(int) /*objIndex*/,
Tcl_Obj *fileName, /* The name of the file (UTF-8). */
Tcl_Obj **attributePtrPtr) /* A pointer to return the object with. */
{
Tcl_StatBuf statBuf;
struct group *groupPtr;
int result;
- (void)objIndex;
result = TclpObjStat(fileName, &statBuf);
@@ -1399,14 +1398,13 @@ GetGroupAttribute(
static int
GetOwnerAttribute(
Tcl_Interp *interp, /* The interp we are using for errors. */
- int objIndex, /* The index of the attribute. */
+ TCL_UNUSED(int) /*objIndex*/,
Tcl_Obj *fileName, /* The name of the file (UTF-8). */
Tcl_Obj **attributePtrPtr) /* A pointer to return the object with. */
{
Tcl_StatBuf statBuf;
struct passwd *pwPtr;
int result;
- (void)objIndex;
result = TclpObjStat(fileName, &statBuf);
@@ -1452,13 +1450,12 @@ GetOwnerAttribute(
static int
GetPermissionsAttribute(
Tcl_Interp *interp, /* The interp we are using for errors. */
- int objIndex, /* The index of the attribute. */
+ TCL_UNUSED(int) /*objIndex*/,
Tcl_Obj *fileName, /* The name of the file (UTF-8). */
Tcl_Obj **attributePtrPtr) /* A pointer to return the object with. */
{
Tcl_StatBuf statBuf;
int result;
- (void)objIndex;
result = TclpObjStat(fileName, &statBuf);
@@ -1495,14 +1492,13 @@ GetPermissionsAttribute(
static int
SetGroupAttribute(
Tcl_Interp *interp, /* The interp for error reporting. */
- int objIndex, /* The index of the attribute. */
+ TCL_UNUSED(int) /*objIndex*/,
Tcl_Obj *fileName, /* The name of the file (UTF-8). */
Tcl_Obj *attributePtr) /* New group for file. */
{
Tcl_WideInt gid;
int result;
const char *native;
- (void)objIndex;
if (Tcl_GetWideIntFromObj(NULL, attributePtr, &gid) != TCL_OK) {
Tcl_DString ds;
@@ -1563,14 +1559,13 @@ SetGroupAttribute(
static int
SetOwnerAttribute(
Tcl_Interp *interp, /* The interp for error reporting. */
- int objIndex, /* The index of the attribute. */
+ TCL_UNUSED(int) /*objIndex*/,
Tcl_Obj *fileName, /* The name of the file (UTF-8). */
Tcl_Obj *attributePtr) /* New owner for file. */
{
Tcl_WideInt uid;
int result;
const char *native;
- (void)objIndex;
if (Tcl_GetWideIntFromObj(NULL, attributePtr, &uid) != TCL_OK) {
Tcl_DString ds;
@@ -1631,7 +1626,7 @@ SetOwnerAttribute(
static int
SetPermissionsAttribute(
Tcl_Interp *interp, /* The interp we are using for errors. */
- int objIndex, /* The index of the attribute. */
+ TCL_UNUSED(int) /*objIndex*/,
Tcl_Obj *fileName, /* The name of the file (UTF-8). */
Tcl_Obj *attributePtr) /* The attribute to set. */
{
@@ -1641,7 +1636,6 @@ SetPermissionsAttribute(
const char *native;
const char *modeStringPtr = TclGetString(attributePtr);
int scanned = TclParseAllWhiteSpace(modeStringPtr, -1);
- (void)objIndex;
/*
* First supply support for octal number format
@@ -1754,7 +1748,7 @@ TclpObjListVolumes(void)
static int
GetModeFromPermString(
- Tcl_Interp *dummy, /* The interp we are using for errors. */
+ TCL_UNUSED(Tcl_Interp *),
const char *modeStringPtr, /* Permissions string */
mode_t *modePtr) /* pointer to the mode value */
{
@@ -1763,7 +1757,6 @@ GetModeFromPermString(
* is passed in), to allow for the chmod style
* manipulation. */
int i,n, who, op, what, op_found, who_found;
- (void)dummy;
/*
* We start off checking for an "rwxrwxrwx" style permissions string
@@ -1942,7 +1935,7 @@ GetModeFromPermString(
int
TclpObjNormalizePath(
- Tcl_Interp *dummy,
+ TCL_UNUSED(Tcl_Interp *),
Tcl_Obj *pathPtr, /* An unshared object containing the path to
* normalize. */
int nextCheckpoint) /* offset to start at in pathPtr. Must either
@@ -1961,7 +1954,6 @@ TclpObjNormalizePath(
#ifndef NO_REALPATH
char normPath[MAXPATHLEN];
#endif
- (void)dummy;
currentPathEndPosition = path + nextCheckpoint;
if (*currentPathEndPosition == '/') {
@@ -2507,13 +2499,12 @@ SetUnixFileAttributes(
static int
GetUnixFileAttributes(
Tcl_Interp *interp, /* The interp we are using for errors. */
- int objIndex, /* The index of the attribute. */
+ TCL_UNUSED(int) /*objIndex*/,
Tcl_Obj *fileName, /* The name of the file (UTF-8). */
Tcl_Obj **attributePtrPtr) /* A pointer to return the object with. */
{
Tcl_StatBuf statBuf;
int result;
- (void)objIndex;
result = TclpObjStat(fileName, &statBuf);
@@ -2549,14 +2540,13 @@ GetUnixFileAttributes(
static int
SetUnixFileAttributes(
Tcl_Interp *interp, /* The interp we are using for errors. */
- int objIndex, /* The index of the attribute. */
+ TCL_UNUSED(int) /*objIndex*/,
Tcl_Obj *fileName, /* The name of the file (UTF-8). */
Tcl_Obj *attributePtr) /* The attribute to set. */
{
Tcl_StatBuf statBuf;
int result, readonly;
const char *native;
- (void)objIndex;
if (Tcl_GetBooleanFromObj(interp, attributePtr, &readonly) != TCL_OK) {
return TCL_ERROR;