From 0e49c4987dc0e1f7d4fc032e0b427a99c5d8e813 Mon Sep 17 00:00:00 2001 From: Matthias Baesken Date: Tue, 18 Feb 2020 16:33:56 +0100 Subject: [PATCH] 8239224: libproc_impl.c previous_thr may be used uninitialized warning Reviewed-by: clanger, dholmes --- src/jdk.hotspot.agent/linux/native/libsaproc/libproc_impl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/jdk.hotspot.agent/linux/native/libsaproc/libproc_impl.c b/src/jdk.hotspot.agent/linux/native/libsaproc/libproc_impl.c index 01d5a58553c..565bc22ce79 100644 --- a/src/jdk.hotspot.agent/linux/native/libsaproc/libproc_impl.c +++ b/src/jdk.hotspot.agent/linux/native/libsaproc/libproc_impl.c @@ -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 @@ void delete_thread_info(struct ps_prochandle* ph, thread_info* thr_to_be_removed 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;