summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorDmitry V. Levin <ldv@altlinux.org>2020-04-24 00:10:19 +0000
committerDmitry V. Levin <ldv@altlinux.org>2020-04-24 00:10:19 +0000
commit5bdb65abf6713c98b0ef374f9f29252d748bd2a9 (patch)
tree6361549da023d097bbeaaf18c0fc0d484f342615 /modules
parentf8fc750496002b6f97c0ba93bfc24bad90f80b16 (diff)
pam_setquota: fix more harmless compilation warnings
On ppc64le the compiler complains with the following diagnostics: pam_setquota.c: In function 'debug': pam_setquota.c:48:59: warning: format '%llu' expects argument of type 'long long unsigned int', but argument 6 has type '__u64' {aka 'const long unsigned int'} [-Wformat=] 48 | pam_syslog(pamh, LOG_DEBUG, "%s device=%s bsoftlimit=%llu bhardlimit=%llu " | ~~~^ | | | long long unsigned int | %lu ...... 51 | p->dqb_bsoftlimit, p->dqb_bhardlimit, | ~~~~~~~~~~~~~~~~~ | | | __u64 {aka const long unsigned int} pam_setquota.c:48:75: warning: format '%llu' expects argument of type 'long long unsigned int', but argument 7 has type '__u64' {aka 'const long unsigned int'} [-Wformat=] 48 | pam_syslog(pamh, LOG_DEBUG, "%s device=%s bsoftlimit=%llu bhardlimit=%llu " | ~~~^ | | | long long unsigned int | %lu ...... 51 | p->dqb_bsoftlimit, p->dqb_bhardlimit, | ~~~~~~~~~~~~~~~~~ | | | __u64 {aka const long unsigned int} pam_setquota.c:48:31: warning: format '%llu' expects argument of type 'long long unsigned int', but argument 8 has type '__u64' {aka 'const long unsigned int'} [-Wformat=] 48 | pam_syslog(pamh, LOG_DEBUG, "%s device=%s bsoftlimit=%llu bhardlimit=%llu " | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ...... 52 | p->dqb_isoftlimit, p->dqb_ihardlimit, | ~~~~~~~~~~~~~~~~~ | | | __u64 {aka const long unsigned int} pam_setquota.c:49:46: note: format string is defined here 49 | "isoftlimit=%llu ihardlimit=%llu btime=%llu itime=%llu", | ~~~^ | | | long long unsigned int | %lu pam_setquota.c:48:31: warning: format '%llu' expects argument of type 'long long unsigned int', but argument 9 has type '__u64' {aka 'const long unsigned int'} [-Wformat=] 48 | pam_syslog(pamh, LOG_DEBUG, "%s device=%s bsoftlimit=%llu bhardlimit=%llu " | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ...... 52 | p->dqb_isoftlimit, p->dqb_ihardlimit, | ~~~~~~~~~~~~~~~~~ | | | __u64 {aka const long unsigned int} pam_setquota.c:49:62: note: format string is defined here 49 | "isoftlimit=%llu ihardlimit=%llu btime=%llu itime=%llu", | ~~~^ | | | long long unsigned int | %lu pam_setquota.c:48:31: warning: format '%llu' expects argument of type 'long long unsigned int', but argument 10 has type '__u64' {aka 'const long unsigned int'} [-Wformat=] 48 | pam_syslog(pamh, LOG_DEBUG, "%s device=%s bsoftlimit=%llu bhardlimit=%llu " | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ...... 53 | p->dqb_btime, p->dqb_itime); | ~~~~~~~~~~~~ | | | __u64 {aka const long unsigned int} pam_setquota.c:49:73: note: format string is defined here 49 | "isoftlimit=%llu ihardlimit=%llu btime=%llu itime=%llu", | ~~~^ | | | long long unsigned int | %lu pam_setquota.c:48:31: warning: format '%llu' expects argument of type 'long long unsigned int', but argument 11 has type '__u64' {aka 'const long unsigned int'} [-Wformat=] 48 | pam_syslog(pamh, LOG_DEBUG, "%s device=%s bsoftlimit=%llu bhardlimit=%llu " | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ...... 53 | p->dqb_btime, p->dqb_itime); | ~~~~~~~~~~~~ | | | __u64 {aka const long unsigned int} pam_setquota.c:49:84: note: format string is defined here 49 | "isoftlimit=%llu ihardlimit=%llu btime=%llu itime=%llu", | ~~~^ | | | long long unsigned int | %lu * modules/pam_setquota/pam_setquota.c (debug): Cast fields of type __u64 to unsigned long long.
Diffstat (limited to 'modules')
-rw-r--r--modules/pam_setquota/pam_setquota.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/modules/pam_setquota/pam_setquota.c b/modules/pam_setquota/pam_setquota.c
index f9580d42..360eee43 100644
--- a/modules/pam_setquota/pam_setquota.c
+++ b/modules/pam_setquota/pam_setquota.c
@@ -47,10 +47,13 @@ debug(pam_handle_t *pamh, const struct if_dqblk *p,
const char *device, const char *dbgprefix) {
pam_syslog(pamh, LOG_DEBUG, "%s device=%s bsoftlimit=%llu bhardlimit=%llu "
"isoftlimit=%llu ihardlimit=%llu btime=%llu itime=%llu",
- dbgprefix, device,
- p->dqb_bsoftlimit, p->dqb_bhardlimit,
- p->dqb_isoftlimit, p->dqb_ihardlimit,
- p->dqb_btime, p->dqb_itime);
+ dbgprefix, device,
+ (unsigned long long) p->dqb_bsoftlimit,
+ (unsigned long long) p->dqb_bhardlimit,
+ (unsigned long long) p->dqb_isoftlimit,
+ (unsigned long long) p->dqb_ihardlimit,
+ (unsigned long long) p->dqb_btime,
+ (unsigned long long) p->dqb_itime);
}
static unsigned long long