File 0882-Set-bogus-uninitialized-values.patch of Package erlang

From 2aa8b309f5ef15cf691c81317e7499aaae0f366c Mon Sep 17 00:00:00 2001
From: Raimo Niskanen <raimo@erlang.org>
Date: Wed, 1 Nov 2023 11:18:44 +0100
Subject: [PATCH] Set bogus uninitialized values

---
 erts/etc/common/inet_gethost.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/erts/etc/common/inet_gethost.c b/erts/etc/common/inet_gethost.c
index 422384c179..05ed4188b0 100644
--- a/erts/etc/common/inet_gethost.c
+++ b/erts/etc/common/inet_gethost.c
@@ -1,7 +1,7 @@
 /*
  * %CopyrightBegin%
  *
- * Copyright Ericsson AB 1998-2022. All Rights Reserved.
+ * Copyright Ericsson AB 1998-2023. All Rights Reserved.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -771,6 +771,11 @@ static void main_loop(void)
     }
 #endif
 
+    /* Satisfy CodeChecker.  Already done in init_workers() */
+    *wsizes[0] = 0;
+    *wsizes[1] = 0;
+    *wsizes[2] = 0;
+
     for(;;) {
 #ifdef WIN32
 	num_handles = 0;
-- 
2.35.3

openSUSE Build Service is sponsored by