URL: https://github.com/SSSD/sssd/pull/5816 Author: pbrezina Title: #5816: debug: fix unused variable warnings Action: opened
PR body: """ ``` /home/pbrezina/workspace/sssd/src/util/debug.c: In function ‘sss_vdebug_fn’: /home/pbrezina/workspace/sssd/src/util/debug.c:274:11: error: unused variable ‘result_fmt’ [-Werror=unused-variable] 274 | char *result_fmt; | ^~~~~~~~~~ /home/pbrezina/workspace/sssd/src/util/debug.c:273:11: error: unused variable ‘chain_id_fmt_dyn’ [-Werror=unused-variable] 273 | char *chain_id_fmt_dyn = NULL; | ^~~~~~~~~~~~~~~~ /home/pbrezina/workspace/sssd/src/util/debug.c:272:10: error: unused variable ‘chain_id_fmt_fixed’ [-Werror=unused-variable] 272 | char chain_id_fmt_fixed[256]; ``` Introduced in: 3d8dd1282ffb7d0188e36d0109340ce622745717 """ To pull the PR as Git branch: git remote add ghsssd https://github.com/SSSD/sssd git fetch ghsssd pull/5816/head:pr5816 git checkout pr5816
From 2a6ff85c70de902807ed821f9eb32ae50160db19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pavel=20B=C5=99ezina?= <pbrez...@redhat.com> Date: Wed, 6 Oct 2021 15:16:12 +0200 Subject: [PATCH] debug: fix unused variable warnings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ``` /home/pbrezina/workspace/sssd/src/util/debug.c: In function ‘sss_vdebug_fn’: /home/pbrezina/workspace/sssd/src/util/debug.c:274:11: error: unused variable ‘result_fmt’ [-Werror=unused-variable] 274 | char *result_fmt; | ^~~~~~~~~~ /home/pbrezina/workspace/sssd/src/util/debug.c:273:11: error: unused variable ‘chain_id_fmt_dyn’ [-Werror=unused-variable] 273 | char *chain_id_fmt_dyn = NULL; | ^~~~~~~~~~~~~~~~ /home/pbrezina/workspace/sssd/src/util/debug.c:272:10: error: unused variable ‘chain_id_fmt_fixed’ [-Werror=unused-variable] 272 | char chain_id_fmt_fixed[256]; ``` Introduced in: 3d8dd1282ffb7d0188e36d0109340ce622745717 --- src/util/debug.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/util/debug.c b/src/util/debug.c index 989589a707..51fb42d3cf 100644 --- a/src/util/debug.c +++ b/src/util/debug.c @@ -269,9 +269,6 @@ void sss_vdebug_fn(const char *file, const char *format, va_list ap) { - char chain_id_fmt_fixed[256]; - char *chain_id_fmt_dyn = NULL; - char *result_fmt; static time_t last_time; static char last_time_str[128]; struct timeval tv; @@ -279,6 +276,9 @@ void sss_vdebug_fn(const char *file, time_t t; #ifdef WITH_JOURNALD + char chain_id_fmt_fixed[256]; + char *chain_id_fmt_dyn = NULL; + char *result_fmt; errno_t ret; va_list ap_fallback;
_______________________________________________ sssd-devel mailing list -- sssd-devel@lists.fedorahosted.org To unsubscribe send an email to sssd-devel-le...@lists.fedorahosted.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedorahosted.org/archives/list/sssd-devel@lists.fedorahosted.org Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure