Skip to content

Commit 3df0ee2

Browse files
authored
Cleanup a lots of unused variables (#223)
This commit just cleans up a lot of unused variables across the code of ProcDump. For further validation, you can compile the code with `-Wall` and `-Werror` enabled. Signed-off-by: Julio Faracco <jcfaracco@gmail.com>
1 parent daa2621 commit 3df0ee2

File tree

3 files changed

+0
-6
lines changed

3 files changed

+0
-6
lines changed

src/CoreDumpWriter.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,6 @@ char* WriteCoreDumpInternal(struct CoreDumpWriter *self, char* socketName)
166166
auto_free char* gcorePrefixName = NULL;
167167
int lineLength;
168168
int i = 0;
169-
int rc = 0;
170169
pid_t gcorePid;
171170
FILE *commandPipe = NULL;
172171

@@ -294,8 +293,6 @@ char* WriteCoreDumpInternal(struct CoreDumpWriter *self, char* socketName)
294293
Log(error, "GCORE - %s", outputBuffer[j]);
295294
}
296295
}
297-
298-
rc = gcoreStatus;
299296
}
300297
else
301298
{
@@ -324,7 +321,6 @@ char* WriteCoreDumpInternal(struct CoreDumpWriter *self, char* socketName)
324321
if (self->Config->NumberOfDumpsCollected >= self->Config->NumberOfDumpsToCollect)
325322
{
326323
SetEvent(&self->Config->evtQuit.event); // shut it down, we're done here
327-
rc = 1;
328324
}
329325
}
330326
}

src/Monitor.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ void* SignalThread(void *input)
6565
{
6666
Trace("SignalThread: Enter [id=%d]", gettid());
6767
int sig_caught, rc;
68-
struct ConfigQueueEntry * item;
6968

7069
if ((rc = sigwait(&sig_set, &sig_caught)) != 0) {
7170
Log(error, "Failed to wait on signal");

src/ProcDumpConfiguration.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,6 @@ void InitProcDumpConfiguration(struct ProcDumpConfiguration *self)
189189
pthread_mutex_init(&self->dotnetMutex, NULL);
190190
pthread_cond_init(&self->dotnetCond, NULL);
191191

192-
long s = self->memAllocMap.size();
193192
if(self->memAllocMap.size() > 0)
194193
{
195194
self->memAllocMap.clear();

0 commit comments

Comments
 (0)