add missing casts for formatted output strings (was generating

warnings on Linux).
This commit is contained in:
gardners 2013-07-19 10:44:54 +09:30
parent 14527fa272
commit d21bb8338f
2 changed files with 3 additions and 3 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, 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);
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, fsize);
DEBUGF("Write to interface %s at offset=%"PRId64, interface->name, (long long int)fsize);
}
ssize_t nwrite = write(interface->alarm.poll.fd, &packet, sizeof(packet));
if (nwrite == -1)
@ -1084,7 +1084,7 @@ logServalPacket(int level, struct __sourceloc __whence, const char *message, con
if (serval_packetvisualise(XPRINTF_MALLOCBUF(&mb), message, packet, len) == -1)
WHY("serval_packetvisualise() failed");
else if (mb.buffer == NULL)
WHYF("serval_packetvisualise() output buffer missing, message=%s packet=%p len=%lu", alloca_toprint(-1, message, strlen(message)), packet, len);
WHYF("serval_packetvisualise() output buffer missing, message=%s packet=%p len=%lu", alloca_toprint(-1, message, strlen(message)), packet, (long unsigned int)len);
else
logString(level, __whence, mb.buffer);
if (mb.buffer)