Use %zu format for size_t & off_t types

This commit is contained in:
Jeremy Lakeman 2013-07-19 22:31:13 +09:30
parent 6dc5fde6b6
commit 6645feb0d8
2 changed files with 2 additions and 2 deletions

2
conf.c
View File

@ -84,7 +84,7 @@ static int reload(const char *path, int *resultp)
if (meta.mtime == -1) {
WARNF("config file %s does not exist -- using all defaults", path);
} else if (meta.size > CONFIG_FILE_MAX_SIZE) {
WHYF("config file %s is too big (%"PRId64" bytes exceeds limit %d)", path, (long long int)meta.size, CONFIG_FILE_MAX_SIZE);
WHYF("config file %s is too big (%zu bytes exceeds limit %d)", path, meta.size, CONFIG_FILE_MAX_SIZE);
return -1;
} else if (meta.size <= 0) {
WARNF("config file %s is zero size -- using all defaults", path);

View File

@ -891,7 +891,7 @@ overlay_broadcast_ensemble(overlay_interface *interface,
if (fsize == -1)
return WHY_perror("lseek");
if (config.debug.overlayinterfaces)
DEBUGF("Write to interface %s at offset=%"PRId64, interface->name, (long long int)fsize);
DEBUGF("Write to interface %s at offset=%zu", interface->name, fsize);
}
ssize_t nwrite = write(interface->alarm.poll.fd, &packet, sizeof(packet));
if (nwrite == -1)