Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37838127
en ru br
Репозитории ALT
S:4.19.0-alt3
5.1: 2.2-alt1
4.1: 1.1-alt1
4.0: 1.1-alt1
3.0: 0.2.13-alt1
www.altlinux.org/Changes

Группа :: Система/Библиотеки
Пакет: libtasn1

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

Патч: Fix-build-tests-with-gcc12.patch
Скачать


From da52d9d5d0358eaf5ae5fec5acfda81c848359b0 Mon Sep 17 00:00:00 2001
From: Mikhail Efremov <sem@altlinux.org>
Date: Thu, 2 Jun 2022 18:50:24 +0300
Subject: [PATCH] Fix build tests with gcc12
Avoid build failure with -Werror=analyzer-use-of-uninitialized-value.
---
 tests/Test_simple.c | 2 +-
 tests/Test_tree.c   | 8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/tests/Test_simple.c b/tests/Test_simple.c
index 6cd07e0..42ad133 100644
--- a/tests/Test_simple.c
+++ b/tests/Test_simple.c
@@ -90,7 +90,7 @@ main (int argc, char *argv[])
   {
     unsigned int etype = 38;
     unsigned int my_str_len = 10;
-    unsigned char my_str[10];
+    unsigned char my_str[10] = {0};
     unsigned int tl_len = 10;
     unsigned char tl[10];
 
diff --git a/tests/Test_tree.c b/tests/Test_tree.c
index 5d7ad03..ea2d34a 100644
--- a/tests/Test_tree.c
+++ b/tests/Test_tree.c
@@ -466,11 +466,11 @@ main (int argc, char *argv[])
   char errorDescription[ASN1_MAX_ERROR_DESCRIPTION_SIZE];
   FILE *out;
   test_type *test;
-  int errorCounter = 0, testCounter = 0, der_len;
-  unsigned char value[1024], der[1024];
-  int valueLen, tag = 0, class = 0;
+  int errorCounter = 0, testCounter = 0, der_len = 0;
+  unsigned char value[1024] = {0}, der[1024] = {0};
+  int valueLen = 0, tag = 0, class = 0;
   int k;
-  int start, end, verbose = 0;
+  int start = 0, end = 0, verbose = 0;
   const char *str_p = NULL;
   const char *treefile = getenv ("ASN1TREE");
 
-- 
2.33.4
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin