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)
                                         ~~                         ^~~~
This commit is contained in:
Dimitry Andric 2020-08-06 19:31:52 +00:00
parent b0e89acc65
commit 228005931c

View File

@ -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;