From: Emmanuel Blot Date: Mon, 19 Jan 2015 13:23:52 +0000 (+0100) Subject: Fix format string for size_t types X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/zpipe.c?a=commitdiff_plain;h=refs%2Fchanges%2F55%2F2955%2F1;p=minix.git Fix format string for size_t types Fix missing “%z[dux]” prefix printf formatter string for `size_t` types. Change-Id: If216a778b0b65e8ab2cdd1c7484cb8452d1f965d --- diff --git a/minix/lib/libsys/env_get_prm.c b/minix/lib/libsys/env_get_prm.c index de6d556b1..b3860b4e6 100644 --- a/minix/lib/libsys/env_get_prm.c +++ b/minix/lib/libsys/env_get_prm.c @@ -52,7 +52,7 @@ int env_get_param(const char *key, char *value, int max_len) m.m_lsys_krn_sys_getinfo.val_len = sizeof(mon_params); m.m_lsys_krn_sys_getinfo.val_ptr = (vir_bytes)mon_params; if ((s=_kernel_call(SYS_GETINFO, &m)) != OK) { - printf("SYS_GETINFO: %d (size %u)\n", s, sizeof(mon_params)); + printf("SYS_GETINFO: %d (size %zu)\n", s, sizeof(mon_params)); return(s); } diff --git a/minix/lib/libvtreefs/inode.c b/minix/lib/libvtreefs/inode.c index 59328d9b9..3b40f8cb0 100644 --- a/minix/lib/libvtreefs/inode.c +++ b/minix/lib/libvtreefs/inode.c @@ -57,7 +57,7 @@ init_inodes(unsigned int inodes, struct inode_stat * stat, } #if DEBUG - printf("VTREEFS: allocated %d+%d+%d bytes\n", + printf("VTREEFS: allocated %zu+%zu+%zu bytes\n", nr_inodes * sizeof(inode[0]), nr_inodes * sizeof(parent_name_head[0]), nr_inodes * sizeof(parent_index_head[0]));