diff --git a/src/Monitor.cpp b/src/Monitor.cpp index 6268edf..1a1c63d 100644 --- a/src/Monitor.cpp +++ b/src/Monitor.cpp @@ -1605,7 +1605,7 @@ void* RestrackManualTriggerThread(void *thread_args /* struct ProcDumpConfigurat #ifdef __linux__ struct ProcDumpConfiguration *config = (struct ProcDumpConfiguration *)thread_args; - struct TerminalState originalTerminalState = {0}; + struct TerminalState originalTerminalState = {{}}; auto_free struct CoreDumpWriter *writer = NULL; std::vector leakReportThreads; int rc = 0; diff --git a/tests/integration/ProcDumpTestApplication.c b/tests/integration/ProcDumpTestApplication.c index 949767c..9103ce3 100644 --- a/tests/integration/ProcDumpTestApplication.c +++ b/tests/integration/ProcDumpTestApplication.c @@ -82,7 +82,7 @@ void* ThreadProc(void *input) // CPU stress function - consumes specified percentage of CPU void stress_cpu(int target_cpu_percentage) { - struct timespec work_time, sleep_time; + struct timespec sleep_time; long work_usec, sleep_usec; // Calculate work and sleep times for desired CPU percentage @@ -90,9 +90,6 @@ void stress_cpu(int target_cpu_percentage) { work_usec = (10000 * target_cpu_percentage) / 100; sleep_usec = 10000 - work_usec; - work_time.tv_sec = work_usec / 1000000; - work_time.tv_nsec = (work_usec % 1000000) * 1000; - sleep_time.tv_sec = sleep_usec / 1000000; sleep_time.tv_nsec = (sleep_usec % 1000000) * 1000; @@ -282,4 +279,4 @@ int main(int argc, char *argv[]) printf("No arguments specified.\n"); exit(1); } -} \ No newline at end of file +}