Silence compiler warnings on Solaris with gcc 3.4.3

This commit is contained in:
Todd C. Miller
2011-08-23 16:42:18 -04:00
parent 335901388e
commit d81c14005f
5 changed files with 38 additions and 31 deletions

View File

@@ -956,12 +956,14 @@ exec_setup(struct command_details *details, const char *ptyname, int ptyfd)
*/
#ifdef HAVE_SETEUID
if (ISSET(details->flags, CD_SET_EGID) && setegid(details->egid)) {
warning(_("unable to set effective gid to runas gid %u"), details->egid);
warning(_("unable to set effective gid to runas gid %u"),
(unsigned int)details->egid);
goto done;
}
#endif
if (ISSET(details->flags, CD_SET_GID) && setgid(details->gid)) {
warning(_("unable to set gid to runas gid %u"), details->gid);
warning(_("unable to set gid to runas gid %u"),
(unsigned int)details->gid);
goto done;
}
@@ -1000,8 +1002,8 @@ exec_setup(struct command_details *details, const char *ptyname, int ptyfd)
}
#elif HAVE_SETREUID
if (setreuid(details->uid, details->euid) != 0) {
warning(_("unable to change to runas uid (%u, %u)"), details->uid,
details->euid);
warning(_("unable to change to runas uid (%u, %u)"),
(unsigned int)details->uid, (unsigned int)details->euid);
goto done;
}
#else