Skip to content

Commit

Permalink
Cleanup a lots of unused variables (#223)
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
jcfaracco authored Dec 15, 2023
1 parent daa2621 commit 3df0ee2
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 6 deletions.
4 changes: 0 additions & 4 deletions src/CoreDumpWriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,6 @@ char* WriteCoreDumpInternal(struct CoreDumpWriter *self, char* socketName)
auto_free char* gcorePrefixName = NULL;
int lineLength;
int i = 0;
int rc = 0;
pid_t gcorePid;
FILE *commandPipe = NULL;

Expand Down Expand Up @@ -294,8 +293,6 @@ char* WriteCoreDumpInternal(struct CoreDumpWriter *self, char* socketName)
Log(error, "GCORE - %s", outputBuffer[j]);
}
}

rc = gcoreStatus;
}
else
{
Expand Down Expand Up @@ -324,7 +321,6 @@ char* WriteCoreDumpInternal(struct CoreDumpWriter *self, char* socketName)
if (self->Config->NumberOfDumpsCollected >= self->Config->NumberOfDumpsToCollect)
{
SetEvent(&self->Config->evtQuit.event); // shut it down, we're done here
rc = 1;
}
}
}
Expand Down
1 change: 0 additions & 1 deletion src/Monitor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ void* SignalThread(void *input)
{
Trace("SignalThread: Enter [id=%d]", gettid());
int sig_caught, rc;
struct ConfigQueueEntry * item;

if ((rc = sigwait(&sig_set, &sig_caught)) != 0) {
Log(error, "Failed to wait on signal");
Expand Down
1 change: 0 additions & 1 deletion src/ProcDumpConfiguration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,6 @@ void InitProcDumpConfiguration(struct ProcDumpConfiguration *self)
pthread_mutex_init(&self->dotnetMutex, NULL);
pthread_cond_init(&self->dotnetCond, NULL);

long s = self->memAllocMap.size();
if(self->memAllocMap.size() > 0)
{
self->memAllocMap.clear();
Expand Down

0 comments on commit 3df0ee2

Please sign in to comment.