From: florian Date: Sun, 2 Jun 2024 17:44:06 +0000 (+0000) Subject: prev_plen is only accessed on the 2nd round through the loop. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=be6176a957eee022982f6b1f310dcf66034e3840;p=openbsd prev_plen is only accessed on the 2nd round through the loop. Static analysers don't understand this. So give it a value to shut them up. Reported by jsg --- diff --git a/sbin/dhcp6leased/parse.y b/sbin/dhcp6leased/parse.y index 2ed076a9b9d..da2a095fb00 100644 --- a/sbin/dhcp6leased/parse.y +++ b/sbin/dhcp6leased/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.3 2024/06/02 17:26:54 florian Exp $ */ +/* $OpenBSD: parse.y,v 1.4 2024/06/02 17:44:06 florian Exp $ */ /* * Copyright (c) 2018, 2024 Florian Obser @@ -792,7 +792,7 @@ addressing_plan(struct iface_ia_conf *ia_conf) { struct iface_pd_conf *pd_conf; uint64_t *p, lo_counter, hi_counter, lo_shift, hi_shift; - int prev_plen; + int prev_plen = -1; lo_counter = hi_counter = 0;