backport r17392: Compile without warnings on solaris

svn:r17450
This commit is contained in:
Roger Dingledine 2008-12-02 22:50:18 +00:00
parent d973aea86c
commit 78d8680672
2 changed files with 9 additions and 4 deletions

View File

@ -4,6 +4,7 @@ Changes in version 0.2.0.33 - 200?-??-??
could make gcc generate non-functional binary search code. Bugfix
on 0.2.0.10-alpha.
- Build correctly on platforms without socklen_t.
- Compile without warnings on solaris.
- Avoid potential crash on internal error during signature collection.
Fixes bug 864. Patch from rovv.

View File

@ -895,7 +895,8 @@ log_credential_status(void)
return -1;
} else {
log_fn(CREDENTIAL_LOG_LEVEL, LD_GENERAL,
"UID is %u (real), %u (effective), %u (saved)", ruid, euid, suid);
"UID is %u (real), %u (effective), %u (saved)",
(unsigned)ruid, (unsigned)euid, (unsigned)suid);
}
#else
/* getresuid is not present on MacOS X, so we can't get the saved (E)UID */
@ -904,7 +905,8 @@ log_credential_status(void)
(void)suid;
log_fn(CREDENTIAL_LOG_LEVEL, LD_GENERAL,
"UID is %u (real), %u (effective), unknown (saved)", ruid, euid);
"UID is %u (real), %u (effective), unknown (saved)",
(unsigned)ruid, (unsigned)euid);
#endif
/* log GIDs */
@ -914,7 +916,8 @@ log_credential_status(void)
return -1;
} else {
log_fn(CREDENTIAL_LOG_LEVEL, LD_GENERAL,
"GID is %u (real), %u (effective), %u (saved)", rgid, egid, sgid);
"GID is %u (real), %u (effective), %u (saved)",
(unsigned)rgid, (unsigned)egid, (unsigned)sgid);
}
#else
/* getresgid is not present on MacOS X, so we can't get the saved (E)GID */
@ -922,7 +925,8 @@ log_credential_status(void)
egid = getegid();
(void)sgid;
log_fn(CREDENTIAL_LOG_LEVEL, LD_GENERAL,
"GID is %u (real), %u (effective), unknown (saved)", rgid, egid);
"GID is %u (real), %u (effective), unknown (saved)",
(unsigned)rgid, (unsigned)egid);
#endif
/* log supplementary groups */