From 03d37947ca0f5436d4a0bef27bd50f19acbfe16c Mon Sep 17 00:00:00 2001 From: "Andrew G. Morgan" Date: Thu, 13 Sep 2001 02:31:39 +0000 Subject: Relevant BUGIDs: 461089 Purpose of commit: cleanup Commit summary: --------------- remove a compilation warning. --- modules/pam_unix/pam_unix_passwd.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'modules/pam_unix') diff --git a/modules/pam_unix/pam_unix_passwd.c b/modules/pam_unix/pam_unix_passwd.c index 85c0a44d..7f8f6e03 100644 --- a/modules/pam_unix/pam_unix_passwd.c +++ b/modules/pam_unix/pam_unix_passwd.c @@ -350,7 +350,14 @@ static int _update_passwd(const char *forwho, const char *towhat) tmpent = fgetpwent(opwfile); while (tmpent) { if (!strcmp(tmpent->pw_name, forwho)) { - tmpent->pw_passwd = towhat; + /* To shut gcc up */ + union { + const char *const_charp; + char *charp; + } assigned_passwd; + assigned_passwd.const_charp = towhat; + + tmpent->pw_passwd = assigned_passwd.charp; } if (putpwent(tmpent, pwfile)) { fprintf(stderr, "error writing entry to password file: %s\n", -- cgit v1.2.3