summaryrefslogtreecommitdiff
path: root/accel-pppd/extra
diff options
context:
space:
mode:
authorMarek Michalkiewicz <marekm@amelek.gda.pl>2016-05-28 23:23:16 +0200
committerDmitry Kozlov <xeb@mail.ru>2016-05-31 12:38:21 +0300
commit74d9a93067733e61d27038b905bf0f8325a102b5 (patch)
tree67f3cc4b6b85d3aab463b74623f2fc0e0bc2805c /accel-pppd/extra
parent492e0d46037630e0654210d8adea6b83d61dab58 (diff)
downloadaccel-ppp-74d9a93067733e61d27038b905bf0f8325a102b5.tar.gz
accel-ppp-74d9a93067733e61d27038b905bf0f8325a102b5.zip
accel-ppp Debian x32 fix minor -Wformat warnings
Hello, small patch to avoid gcc -Wformat warnings on Debian x32 where time_t is "long long" (64-bit signed, to be 2038 safe), not "unsigned long" (32-bit unsigned) corresponding to "%lu" format strings. Regards, Marek
Diffstat (limited to 'accel-pppd/extra')
-rw-r--r--accel-pppd/extra/pppd_compat.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/accel-pppd/extra/pppd_compat.c b/accel-pppd/extra/pppd_compat.c
index 2956624d..2c8460f8 100644
--- a/accel-pppd/extra/pppd_compat.c
+++ b/accel-pppd/extra/pppd_compat.c
@@ -468,7 +468,7 @@ static void write_radattr(struct pppd_compat_pd *pd, struct rad_packet_t *pack)
fprintf(f, "%i.%i.%i.%i\n", (addr >> 24) & 0xff, (addr >> 16) & 0xff, (addr >> 8) & 0xff, addr & 0xff);
break;
case ATTR_TYPE_DATE:
- fprintf(f, "%lu\n", attr->val.date);
+ fprintf(f, "%lu\n", (unsigned long) attr->val.date);
break;
}
}
@@ -560,7 +560,7 @@ static void fill_env(char **env, char *mem, struct pppd_compat_pd *pd)
if (pd->ses->stop_time) {
env[n++] = mem;
- mem += sprintf(mem, "CONNECT_TIME=%lu", pd->ses->stop_time - pd->ses->start_time) + 1;
+ mem += sprintf(mem, "CONNECT_TIME=%lu", (unsigned long)(pd->ses->stop_time - pd->ses->start_time)) + 1;
env[n++] = mem;
mem += sprintf(mem, "BYTES_SENT=%" PRIu64, tx_bytes) + 1;
env[n++] = mem;