changeset 58088:d1c0dc3719c6

8239224: libproc_impl.c previous_thr may be used uninitialized warning Reviewed-by: clanger, dholmes
author mbaesken
date Tue, 18 Feb 2020 16:33:56 +0100
parents 615b494384e4
children de9088d16202
files src/jdk.hotspot.agent/linux/native/libsaproc/libproc_impl.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/jdk.hotspot.agent/linux/native/libsaproc/libproc_impl.c	Tue Feb 18 16:34:19 2020 +0100
+++ b/src/jdk.hotspot.agent/linux/native/libsaproc/libproc_impl.c	Tue Feb 18 16:33:56 2020 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -273,7 +273,7 @@
     if (thr_to_be_removed == ph->threads) {
       ph->threads = ph->threads->next;
     } else {
-      thread_info* previous_thr;
+      thread_info* previous_thr = NULL;
       while (current_thr && current_thr != thr_to_be_removed) {
         previous_thr = current_thr;
         current_thr = current_thr->next;