From b6ae236607e28c5e64d6a6541aacfb597fac8632 Mon Sep 17 00:00:00 2001 From: lingsheng Date: Mon, 11 Jan 2021 15:04:26 +0800 Subject: [PATCH] Initialize 'nrhs' to avoid gcc warning --- Initialize-nrhs-to-avoid-gcc-warning.patch | 29 ++++++++++++++++++++++ ltrace.spec | 6 ++++- 2 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 Initialize-nrhs-to-avoid-gcc-warning.patch diff --git a/Initialize-nrhs-to-avoid-gcc-warning.patch b/Initialize-nrhs-to-avoid-gcc-warning.patch new file mode 100644 index 0000000..a4f091e --- /dev/null +++ b/Initialize-nrhs-to-avoid-gcc-warning.patch @@ -0,0 +1,29 @@ +From dac8e133866684c2e090f9922871dc3e3b501a30 Mon Sep 17 00:00:00 2001 +From: lingsheng +Date: Mon, 11 Jan 2021 14:27:49 +0800 +Subject: [PATCH] Initialize 'nrhs' to avoid gcc warning + +--- + expr.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/expr.c b/expr.c +index 4059a32..01851c8 100644 +--- a/expr.c ++++ b/expr.c +@@ -189,10 +189,10 @@ int + expr_clone(struct expr_node *retp, const struct expr_node *node) + { + *retp = *node; ++ struct expr_node *nlhs; ++ struct expr_node *nrhs = NULL; + + switch (node->kind) { +- struct expr_node *nlhs; +- struct expr_node *nrhs; + + case EXPR_OP_ARGNO: + case EXPR_OP_SELF: +-- +2.23.0 + diff --git a/ltrace.spec b/ltrace.spec index b422c17..2e49541 100644 --- a/ltrace.spec +++ b/ltrace.spec @@ -1,6 +1,6 @@ name: ltrace Version: 0.7.91 -Release: 30 +Release: 31 Summary: Trace the Library and System Calls a Program Makes License: GPLv2+ @@ -29,6 +29,7 @@ Patch9000: bugfix-0001-ltrace-0.7.91-aarch64_be-compile-support.patch Patch9001: bugfix-0001-ltrace-byteswap-instruction-in-arm-be8-mode.patch Patch9002: bugfix-for-use-after-free-about-soname.patch Patch9003: fix-null-directive-argument.patch +Patch9004: Initialize-nrhs-to-avoid-gcc-warning.patch BuildRequires: elfutils-devel dejagnu libselinux-devel autoconf automake libtool @@ -74,6 +75,9 @@ autoreconf -i %{_mandir}/man5/ltrace.conf.5* %changelog +* Mon Jan 11 2021 lingsheng - 0.7.91-31 +- Initialize 'nrhs' to avoid gcc warning + * Sat May 16 2020 Senlin Xia - 0.7.91-30 - fix the error: "%s" directive argument is NULL [-Werror=format-overflow=] -- Gitee