summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2005-02-27 22:36:00 (GMT)
committerAndy Cedilnik <andy.cedilnik@kitware.com>2005-02-27 22:36:00 (GMT)
commit588653c4e8f16ab6f2cd5e552782057b5e679c9f (patch)
tree2584fd6ad674818a370ebd96cbf6bd6c8243e968 /Source
parent8946d2f55e1042dbcfb5faa37d558c46cdea0eb1 (diff)
downloadCMake-588653c4e8f16ab6f2cd5e552782057b5e679c9f.zip
CMake-588653c4e8f16ab6f2cd5e552782057b5e679c9f.tar.gz
CMake-588653c4e8f16ab6f2cd5e552782057b5e679c9f.tar.bz2
COMP: Remove warnings about shadow variables
Diffstat (limited to 'Source')
-rw-r--r--Source/CTest/Curl/file.c6
-rw-r--r--Source/CTest/Curl/ftp.c6
-rw-r--r--Source/CTest/Curl/http.c14
-rw-r--r--Source/CTest/Curl/sendf.c6
-rw-r--r--Source/kwsys/ProcessUNIX.c38
5 files changed, 35 insertions, 35 deletions
diff --git a/Source/CTest/Curl/file.c b/Source/CTest/Curl/file.c
index 1fe6e5d..cd4366c 100644
--- a/Source/CTest/Curl/file.c
+++ b/Source/CTest/Curl/file.c
@@ -320,12 +320,12 @@ CURLcode Curl_file(struct connectdata *conn)
#ifdef HAVE_STRFTIME
if(fstated) {
struct tm *tm;
- time_t clock = (time_t)statbuf.st_mtime;
+ time_t cuClock = (time_t)statbuf.st_mtime;
#ifdef HAVE_GMTIME_R
struct tm buffer;
- tm = (struct tm *)gmtime_r(&clock, &buffer);
+ tm = (struct tm *)gmtime_r(&cuClock, &buffer);
#else
- tm = gmtime(&clock);
+ tm = gmtime(&cuClock);
#endif
/* format: "Tue, 15 Nov 1994 12:45:26 GMT" */
strftime(buf, BUFSIZE-1, "Last-Modified: %a, %d %b %Y %H:%M:%S GMT\r\n",
diff --git a/Source/CTest/Curl/ftp.c b/Source/CTest/Curl/ftp.c
index 60881b0..2501412 100644
--- a/Source/CTest/Curl/ftp.c
+++ b/Source/CTest/Curl/ftp.c
@@ -2203,12 +2203,12 @@ CURLcode ftp_perform(struct connectdata *conn,
#ifdef HAVE_STRFTIME
if(data->set.get_filetime && (data->info.filetime>=0) ) {
struct tm *tm;
- time_t clock = (time_t)data->info.filetime;
+ time_t cuClock = (time_t)data->info.filetime;
#ifdef HAVE_GMTIME_R
struct tm buffer;
- tm = (struct tm *)gmtime_r(&clock, &buffer);
+ tm = (struct tm *)gmtime_r(&cuClock, &buffer);
#else
- tm = gmtime(&clock);
+ tm = gmtime(&cuClock);
#endif
/* format: "Tue, 15 Nov 1994 12:45:26" */
strftime(buf, BUFSIZE-1, "Last-Modified: %a, %d %b %Y %H:%M:%S GMT\r\n",
diff --git a/Source/CTest/Curl/http.c b/Source/CTest/Curl/http.c
index ef01d2f..7cf543b 100644
--- a/Source/CTest/Curl/http.c
+++ b/Source/CTest/Curl/http.c
@@ -1410,8 +1410,8 @@ CURLcode Curl_http(struct connectdata *conn)
uses the encoded host name! */
if(conn->host.dispname != conn->host.name) {
char *url = data->change.url;
- char *ptr = strstr(url, conn->host.dispname);
- if(ptr) {
+ char *iPtr = strstr(url, conn->host.dispname);
+ if(iPtr) {
/* This is where the display name starts in the URL, now replace this
part with the encoded name. TODO: This method of replacing the host
name is rather crude as I believe there's a slight risk that the
@@ -1426,13 +1426,13 @@ CURLcode Curl_http(struct connectdata *conn)
newurl = malloc(urllen + newlen - currlen + 1);
if(newurl) {
/* copy the part before the host name */
- memcpy(newurl, url, ptr - url);
+ memcpy(newurl, url, iPtr - url);
/* append the new host name instead of the old */
- memcpy(newurl + (ptr - url), conn->host.name, newlen);
+ memcpy(newurl + (iPtr - url), conn->host.name, newlen);
/* append the piece after the host name */
- memcpy(newurl + newlen + (ptr - url),
- ptr + currlen, /* copy the trailing zero byte too */
- urllen - (ptr-url) - currlen + 1);
+ memcpy(newurl + newlen + (iPtr - url),
+ iPtr + currlen, /* copy the trailing zero byte too */
+ urllen - (iPtr-url) - currlen + 1);
if(data->change.url_alloc)
free(data->change.url);
data->change.url = newurl;
diff --git a/Source/CTest/Curl/sendf.c b/Source/CTest/Curl/sendf.c
index 89c2665..fae2ff3 100644
--- a/Source/CTest/Curl/sendf.c
+++ b/Source/CTest/Curl/sendf.c
@@ -88,10 +88,10 @@ struct curl_slist *curl_slist_append(struct curl_slist *list,
new_item = (struct curl_slist *) malloc(sizeof(struct curl_slist));
if (new_item) {
- char *dup = strdup(data);
- if(dup) {
+ char *cuDup = strdup(data);
+ if(cuDup) {
new_item->next = NULL;
- new_item->data = dup;
+ new_item->data = cuDup;
}
else {
free(new_item);
diff --git a/Source/kwsys/ProcessUNIX.c b/Source/kwsys/ProcessUNIX.c
index c5e0ada..6900906 100644
--- a/Source/kwsys/ProcessUNIX.c
+++ b/Source/kwsys/ProcessUNIX.c
@@ -83,7 +83,7 @@ typedef struct kwsysProcessCreateInformation_s
static int kwsysProcessInitialize(kwsysProcess* cp);
static void kwsysProcessCleanup(kwsysProcess* cp, int error);
static void kwsysProcessCleanupDescriptor(int* pfd);
-static int kwsysProcessCreate(kwsysProcess* cp, int index,
+static int kwsysProcessCreate(kwsysProcess* cp, int prIndex,
kwsysProcessCreateInformation* si, int* readEnd);
static int kwsysProcessSetupOutputPipeFile(int* p, const char* name);
static int kwsysProcessGetTimeoutTime(kwsysProcess* cp, double* userTimeout,
@@ -397,14 +397,14 @@ int kwsysProcess_SetWorkingDirectory(kwsysProcess* cp, const char* dir)
}
/*--------------------------------------------------------------------------*/
-int kwsysProcess_SetPipeFile(kwsysProcess* cp, int pipe, const char* file)
+int kwsysProcess_SetPipeFile(kwsysProcess* cp, int prPipe, const char* file)
{
char** pfile;
if(!cp)
{
return 0;
}
- switch(pipe)
+ switch(prPipe)
{
case kwsysProcess_Pipe_STDIN: pfile = &cp->PipeFileSTDIN; break;
case kwsysProcess_Pipe_STDOUT: pfile = &cp->PipeFileSTDOUT; break;
@@ -429,20 +429,20 @@ int kwsysProcess_SetPipeFile(kwsysProcess* cp, int pipe, const char* file)
/* If we are redirecting the pipe, do not share it. */
if(*pfile)
{
- kwsysProcess_SetPipeShared(cp, pipe, 0);
+ kwsysProcess_SetPipeShared(cp, prPipe, 0);
}
return 1;
}
/*--------------------------------------------------------------------------*/
-void kwsysProcess_SetPipeShared(kwsysProcess* cp, int pipe, int shared)
+void kwsysProcess_SetPipeShared(kwsysProcess* cp, int prPipe, int shared)
{
if(!cp)
{
return;
}
- switch(pipe)
+ switch(prPipe)
{
case kwsysProcess_Pipe_STDIN: cp->PipeSharedSTDIN = shared?1:0; break;
case kwsysProcess_Pipe_STDOUT: cp->PipeSharedSTDOUT = shared?1:0; break;
@@ -453,7 +453,7 @@ void kwsysProcess_SetPipeShared(kwsysProcess* cp, int pipe, int shared)
/* If we are sharing the pipe, do not redirect it to a file. */
if(shared)
{
- kwsysProcess_SetPipeFile(cp, pipe, 0);
+ kwsysProcess_SetPipeFile(cp, prPipe, 0);
}
}
@@ -954,7 +954,7 @@ int kwsysProcess_WaitForExit(kwsysProcess* cp, double* userTimeout)
{
int result = 0;
int status = 0;
- int pipe = 0;
+ int prPipe = 0;
/* Make sure we are executing a process. */
if(!cp || cp->State != kwsysProcess_State_Executing)
@@ -963,9 +963,9 @@ int kwsysProcess_WaitForExit(kwsysProcess* cp, double* userTimeout)
}
/* Wait for all the pipes to close. Ignore all data. */
- while((pipe = kwsysProcess_WaitForData(cp, 0, 0, userTimeout)) > 0)
+ while((prPipe = kwsysProcess_WaitForData(cp, 0, 0, userTimeout)) > 0)
{
- if(pipe == kwsysProcess_Pipe_Timeout)
+ if(prPipe == kwsysProcess_Pipe_Timeout)
{
return 0;
}
@@ -1215,11 +1215,11 @@ static void kwsysProcessCleanupDescriptor(int* pfd)
}
/*--------------------------------------------------------------------------*/
-static int kwsysProcessCreate(kwsysProcess* cp, int index,
+static int kwsysProcessCreate(kwsysProcess* cp, int prIndex,
kwsysProcessCreateInformation* si, int* readEnd)
{
/* Setup the process's stdin. */
- if(index > 0)
+ if(prIndex > 0)
{
si->StdIn = *readEnd;
*readEnd = 0;
@@ -1269,7 +1269,7 @@ static int kwsysProcessCreate(kwsysProcess* cp, int index,
/* Replace the stdout pipe with a file if requested. In this case
the select call will report that stdout is closed immediately. */
- if(index == cp->NumberOfCommands-1 && cp->PipeFileSTDOUT)
+ if(prIndex == cp->NumberOfCommands-1 && cp->PipeFileSTDOUT)
{
if(!kwsysProcessSetupOutputPipeFile(&si->StdOut, cp->PipeFileSTDOUT))
{
@@ -1280,7 +1280,7 @@ static int kwsysProcessCreate(kwsysProcess* cp, int index,
/* Replace the stdout pipe with the parent's if requested. In this
case the select call will report that stderr is closed
immediately. */
- if(index == cp->NumberOfCommands-1 && cp->PipeSharedSTDOUT)
+ if(prIndex == cp->NumberOfCommands-1 && cp->PipeSharedSTDOUT)
{
kwsysProcessCleanupDescriptor(&si->StdOut);
si->StdOut = 1;
@@ -1299,13 +1299,13 @@ static int kwsysProcessCreate(kwsysProcess* cp, int index,
}
/* Fork off a child process. */
- cp->ForkPIDs[index] = kwsysProcessFork(cp, si);
- if(cp->ForkPIDs[index] < 0)
+ cp->ForkPIDs[prIndex] = kwsysProcessFork(cp, si);
+ if(cp->ForkPIDs[prIndex] < 0)
{
return 0;
}
- if(cp->ForkPIDs[index] == 0)
+ if(cp->ForkPIDs[prIndex] == 0)
{
/* Close the read end of the error reporting pipe. */
close(si->ErrorPipe[0]);
@@ -1340,7 +1340,7 @@ static int kwsysProcessCreate(kwsysProcess* cp, int index,
kwsysProcessRestoreDefaultSignalHandlers();
/* Execute the real process. If successful, this does not return. */
- execvp(cp->Commands[index][0], cp->Commands[index]);
+ execvp(cp->Commands[prIndex][0], cp->Commands[prIndex]);
/* Failure. Report error to parent and terminate. */
kwsysProcessChildErrorExit(si->ErrorPipe[1]);
@@ -1378,7 +1378,7 @@ static int kwsysProcessCreate(kwsysProcess* cp, int index,
}
/* Successfully created this child process. */
- if(index > 0 || si->StdIn > 0)
+ if(prIndex > 0 || si->StdIn > 0)
{
/* The parent process does not need the input pipe read end. */
kwsysProcessCleanupDescriptor(&si->StdIn);