dpward / rpms / sssd

Forked from rpms/sssd 3 years ago
Clone

Blame SOURCES/0165-SECRETS-Fix-warning-Wpointer-bool-conversion.patch

bb7cd1
From 0e1416e65c99aca947e589bfa56d5bc832c023d6 Mon Sep 17 00:00:00 2001
bb7cd1
From: Lukas Slebodnik <lslebodn@redhat.com>
bb7cd1
Date: Sat, 27 May 2017 14:39:45 +0200
bb7cd1
Subject: [PATCH 165/166] SECRETS: Fix warning Wpointer-bool-conversion
bb7cd1
bb7cd1
Debug messages would always say that verify_peer and verify_host
bb7cd1
are enabled. Even though they would be explicitly disabled.
bb7cd1
bb7cd1
src/responder/secrets/proxy.c:143:18: error:
bb7cd1
    address of 'cfg->verify_peer' will always evaluate to
bb7cd1
      'true' [-Werror,-Wpointer-bool-conversion]
bb7cd1
          (&cfg->verify_peer ? "true" : "false"));
bb7cd1
            ~~~~~^~~~~~~~~~~ ~
bb7cd1
src/util/debug.h:108:32: note: expanded from macro 'DEBUG'
bb7cd1
                     format, ##__VA_ARGS__); \
bb7cd1
                               ^~~~~~~~~~~
bb7cd1
src/responder/secrets/proxy.c:149:18: error:
bb7cd1
    address of 'cfg->verify_host' will always evaluate to
bb7cd1
      'true' [-Werror,-Wpointer-bool-conversion]
bb7cd1
          (&cfg->verify_host ? "true" : "false"));
bb7cd1
            ~~~~~^~~~~~~~~~~ ~
bb7cd1
src/util/debug.h:108:32: note: expanded from macro 'DEBUG'
bb7cd1
                     format, ##__VA_ARGS__); \
bb7cd1
                               ^~~~~~~~~~~
bb7cd1
bb7cd1
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
bb7cd1
---
bb7cd1
 src/responder/secrets/proxy.c | 4 ++--
bb7cd1
 1 file changed, 2 insertions(+), 2 deletions(-)
bb7cd1
bb7cd1
diff --git a/src/responder/secrets/proxy.c b/src/responder/secrets/proxy.c
bb7cd1
index 9c2aa425d414728d10aa830f640632e98def3c1c..a4e97f83ef406e71a1e6509a6b719c47afdfd5b8 100644
bb7cd1
--- a/src/responder/secrets/proxy.c
bb7cd1
+++ b/src/responder/secrets/proxy.c
bb7cd1
@@ -140,13 +140,13 @@ static int proxy_sec_get_cfg(struct proxy_context *pctx,
bb7cd1
                           true, &cfg->verify_peer);
bb7cd1
     if (ret) goto done;
bb7cd1
     DEBUG(SSSDBG_CONF_SETTINGS, "verify_peer: %s\n",
bb7cd1
-          (&cfg->verify_peer ? "true" : "false"));
bb7cd1
+          cfg->verify_peer ? "true" : "false");
bb7cd1
 
bb7cd1
     ret = confdb_get_bool(pctx->cdb, secreq->cfg_section, "verify_host",
bb7cd1
                           true, &cfg->verify_host);
bb7cd1
     if (ret) goto done;
bb7cd1
     DEBUG(SSSDBG_CONF_SETTINGS, "verify_host: %s\n",
bb7cd1
-          (&cfg->verify_host ? "true" : "false"));
bb7cd1
+          cfg->verify_host ? "true" : "false");
bb7cd1
 
bb7cd1
     ret = proxy_get_config_string(pctx, cfg, false, secreq,
bb7cd1
                                   "capath", &cfg->capath);
bb7cd1
-- 
bb7cd1
2.9.4
bb7cd1