aboutsummaryrefslogtreecommitdiff
path: root/lib/libpam
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2020-08-06 19:31:52 +0000
committerDimitry Andric <dim@FreeBSD.org>2020-08-06 19:31:52 +0000
commit228005931ca9c800e306e7b7d4aa0803197fea7d (patch)
tree40b44ec46c152ce65cafe12c981e5664ddb1b823 /lib/libpam
parentb0e89acc6516e48f6bf428238227c55187555b0a (diff)
downloadsrc-228005931ca9c800e306e7b7d4aa0803197fea7d.tar.gz
src-228005931ca9c800e306e7b7d4aa0803197fea7d.zip
Apply tentative fix for clang 11 warning in pam_exec(8):
lib/libpam/modules/pam_exec/pam_exec.c:222:56: error: format specifies type 'char *' but the argument has type 'const void *' [-Werror,-Wformat] if (asprintf(&envstr, "%s=%s", pam_item_env[i].name, item) < 0) ~~ ^~~~
Notes
Notes: svn path=/projects/clang1100-import/; revision=363986
Diffstat (limited to 'lib/libpam')
-rw-r--r--lib/libpam/modules/pam_exec/pam_exec.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/libpam/modules/pam_exec/pam_exec.c b/lib/libpam/modules/pam_exec/pam_exec.c
index cb820fbac3ef..b8f2e1d8fdfc 100644
--- a/lib/libpam/modules/pam_exec/pam_exec.c
+++ b/lib/libpam/modules/pam_exec/pam_exec.c
@@ -219,7 +219,8 @@ _pam_exec(pam_handle_t *pamh,
pam_err = pam_get_item(pamh, pam_item_env[i].item, &item);
if (pam_err != PAM_SUCCESS || item == NULL)
continue;
- if (asprintf(&envstr, "%s=%s", pam_item_env[i].name, item) < 0)
+ if (asprintf(&envstr, "%s=%s", pam_item_env[i].name,
+ (const char *)item) < 0)
OUT(PAM_BUF_ERR);
envlist[envlen++] = envstr;
envlist[envlen] = NULL;