From 3c8950cce94bbea7236b2d07ae8e59f07e4432c5 Mon Sep 17 00:00:00 2001 From: Ben Gras Date: Tue, 2 Dec 2014 21:31:08 +0100 Subject: [PATCH] minix/ changes for arm llvm build . fixes needed to build Minix/ARM with LLVM without errors, mostly size_t cleanness Change-Id: If4dd0a23bc5cb399296073920a8940c34b4caef4 --- minix/drivers/net/lan8710a/lan8710a.c | 3 +-- minix/drivers/storage/mmc/mmchost_mmchs.c | 6 +++--- minix/drivers/usb/usbd/hcd/hcd.c | 10 +++++----- minix/drivers/usb/usbd/hcd/hcd_ddekit.c | 4 ++-- minix/drivers/video/fb/arch/earm/fb_arch.c | 2 +- minix/kernel/arch/earm/Makefile.inc | 3 ++- minix/kernel/arch/earm/hw_intr.c | 12 ++++++------ minix/kernel/arch/earm/include/hw_intr.h | 12 ++++++------ minix/kernel/arch/earm/pre_init.c | 2 +- minix/kernel/proc.c | 2 +- minix/net/inet/Makefile | 2 ++ minix/net/inet/buf.c | 2 +- minix/net/inet/clock.c | 2 +- minix/net/inet/generic/buf.h | 4 ++-- minix/servers/is/dmp_ds.c | 2 +- minix/servers/rs/exec.c | 2 +- minix/servers/rs/manager.c | 4 ++-- minix/servers/vfs/dmap.c | 2 +- minix/servers/vfs/exec.c | 8 ++++---- minix/servers/vfs/proto.h | 4 ++-- minix/servers/vfs/read.c | 6 ++++-- minix/servers/vfs/request.c | 6 +++--- minix/servers/vm/mmap.c | 2 +- minix/tests/blocktest/blocktest.c | 2 +- minix/usr.bin/trace/service/ipc.c | 2 +- minix/usr.bin/trace/service/pm.c | 4 ++-- 26 files changed, 57 insertions(+), 53 deletions(-) diff --git a/minix/drivers/net/lan8710a/lan8710a.c b/minix/drivers/net/lan8710a/lan8710a.c index 9eac5d698..0c61921aa 100644 --- a/minix/drivers/net/lan8710a/lan8710a.c +++ b/minix/drivers/net/lan8710a/lan8710a.c @@ -464,8 +464,7 @@ lan8710a_stop(void) * lan8710a_dma_config_tx * *============================================================================*/ static void -lan8710a_dma_config_tx(desc_idx) -u8_t desc_idx; +lan8710a_dma_config_tx(u8_t desc_idx) { phys_bytes phys_addr; int i; diff --git a/minix/drivers/storage/mmc/mmchost_mmchs.c b/minix/drivers/storage/mmc/mmchost_mmchs.c index e3e4604fe..1a098f1da 100644 --- a/minix/drivers/storage/mmc/mmchost_mmchs.c +++ b/minix/drivers/storage/mmc/mmchost_mmchs.c @@ -99,7 +99,7 @@ mmc_write32(vir_bytes reg, u32_t value) write32(mmchs->io_base + reg, value); } -int +void mmchs_set_bus_freq(u32_t freq) { u32_t freq_in = HSMMCSD_0_IN_FREQ; @@ -971,7 +971,7 @@ dump(uint8_t * data, int len) } } -int +void mmc_switch(int function, int value, uint8_t * data) { struct mmc_command command; @@ -990,7 +990,7 @@ mmc_switch(int function, int value, uint8_t * data) command.args |= (value << fshift); if (mmc_send_cmd(&command)) { log_warn(&log, "Failed to set device in high speed mode\n"); - return 1; + return; } // dump(data,64); } diff --git a/minix/drivers/usb/usbd/hcd/hcd.c b/minix/drivers/usb/usbd/hcd/hcd.c index 018ceea1f..5a3e038e7 100644 --- a/minix/drivers/usb/usbd/hcd/hcd.c +++ b/minix/drivers/usb/usbd/hcd/hcd.c @@ -127,7 +127,7 @@ hcd_handle_event(hcd_device_state * device, hcd_event event, hcd_reg1 val) "for 'hub port LS attach' event"); USB_MSG("Low speed device connected at " - "hub 0x%08X, port %u", device, val); + "hub 0x%p, port %u", device, val); hcd_add_child(device, val, HCD_SPEED_LOW); break; @@ -138,7 +138,7 @@ hcd_handle_event(hcd_device_state * device, hcd_event event, hcd_reg1 val) "for 'hub port FS attach' event"); USB_MSG("Full speed device connected at " - "hub 0x%08X, port %u", device, val); + "hub 0x%p, port %u", device, val); hcd_add_child(device, val, HCD_SPEED_FULL); break; @@ -149,7 +149,7 @@ hcd_handle_event(hcd_device_state * device, hcd_event event, hcd_reg1 val) "for 'hub port HS attach' event"); USB_MSG("High speed device connected at " - "hub 0x%08X, port %u", device, val); + "hub 0x%p, port %u", device, val); hcd_add_child(device, val, HCD_SPEED_HIGH); break; @@ -162,7 +162,7 @@ hcd_handle_event(hcd_device_state * device, hcd_event event, hcd_reg1 val) hcd_delete_child(device, val); USB_MSG("Device disconnected from " - "hub 0x%08X, port %u", device, val); + "hub 0x%p, port %u", device, val); break; @@ -456,7 +456,7 @@ hcd_dump_tree(hcd_device_state * device, hcd_reg1 level) /* DEBUG_DUMP; */ /* Let's keep tree output cleaner */ - USB_MSG("Device on level %03u: 0x%08X", level, device); + USB_MSG("Device on level %03u: 0x%p", level, device); /* Traverse device tree recursively */ for (child_num = 0; child_num < HCD_CHILDREN; child_num++) { diff --git a/minix/drivers/usb/usbd/hcd/hcd_ddekit.c b/minix/drivers/usb/usbd/hcd/hcd_ddekit.c index c9862c865..45ec5ced4 100644 --- a/minix/drivers/usb/usbd/hcd/hcd_ddekit.c +++ b/minix/drivers/usb/usbd/hcd/hcd_ddekit.c @@ -254,8 +254,8 @@ ddekit_usb_init(struct ddekit_usb_driver * drv, connect_cb = drv->connect; disconnect_cb = drv->disconnect; - *_m = malloc; - *_f = free; + *_m = (ddekit_usb_malloc_fn) malloc; + *_f = (ddekit_usb_free_fn) free; return EXIT_SUCCESS; } diff --git a/minix/drivers/video/fb/arch/earm/fb_arch.c b/minix/drivers/video/fb/arch/earm/fb_arch.c index 6e3e58a1c..58bcc8c10 100644 --- a/minix/drivers/video/fb/arch/earm/fb_arch.c +++ b/minix/drivers/video/fb/arch/earm/fb_arch.c @@ -283,7 +283,7 @@ arch_put_varscreeninfo(int minor, struct fb_var_screeninfo *fbvsp) /* For now we only allow to play with the yoffset setting */ if (fbvsp->yoffset != omap_fbvs[minor].yoffset) { - if (fbvsp->yoffset < 0 || fbvsp->yoffset > omap_fbvs[minor].yres) { + if (/* fbvsp->yoffset < 0 || */ fbvsp->yoffset > omap_fbvs[minor].yres) { return EINVAL; } diff --git a/minix/kernel/arch/earm/Makefile.inc b/minix/kernel/arch/earm/Makefile.inc index eb56e80c5..6f0baa6b1 100644 --- a/minix/kernel/arch/earm/Makefile.inc +++ b/minix/kernel/arch/earm/Makefile.inc @@ -19,7 +19,7 @@ MINC_OBJS_UNPAGED= atoi.o \ strcmp.o strcpy.o strlen.o strncmp.o \ memcpy.o memmove.o memset.o \ udivdi3.o umoddi3.o qdivrem.o -MINC_OBJS_UNPAGED+= __aeabi_ldiv0.o __aeabi_idiv0.o __aeabi_uldivmod.o divide.o divsi3.o udivsi3.o +MINC_OBJS_UNPAGED+= __aeabi_ldiv0.o __aeabi_idiv0.o __aeabi_uldivmod.o divide.o divsi3.o udivsi3.o umodsi3.o atoi.o: ${NETBSDSRCDIR}/minix/lib/libminc/atoi.c printf.o: ${NETBSDSRCDIR}/sys/lib/libsa/printf.c subr_prf.o: ${NETBSDSRCDIR}/sys/lib/libsa/subr_prf.c @@ -37,6 +37,7 @@ __aeabi_uldivmod.o: ${NETBSDSRCDIR}/common/lib/libc/arch/arm/quad/__aeabi_uldivm divide.o: ${NETBSDSRCDIR}/common/lib/libc/arch/arm/gen/divide.S divsi3.o: ${NETBSDSRCDIR}/common/lib/libc/arch/arm/gen/divsi3.S udivsi3.o: ${NETBSDSRCDIR}/common/lib/libc/arch/arm/gen/udivsi3.S +umodsi3.o: ${NETBSDSRCDIR}/common/lib/libc/arch/arm/gen/umodsi3.S # the following is required by pre_init.c strncmp.o: ${NETBSDSRCDIR}/common/lib/libc/string/strncmp.c diff --git a/minix/kernel/arch/earm/hw_intr.c b/minix/kernel/arch/earm/hw_intr.c index 8e97a61f9..e426fdb4f 100644 --- a/minix/kernel/arch/earm/hw_intr.c +++ b/minix/kernel/arch/earm/hw_intr.c @@ -2,15 +2,15 @@ #include "hw_intr.h" #include "bsp_intr.h" -int hw_intr_mask(int irq){ +void hw_intr_mask(int irq){ bsp_irq_mask(irq); } -int hw_intr_unmask(int irq){ +void hw_intr_unmask(int irq){ bsp_irq_unmask(irq); } -int hw_intr_ack(int irq){}; -int hw_intr_used(int irq){}; -int hw_intr_not_used(int irq){}; -int hw_intr_disable_all(){}; +void hw_intr_ack(int irq){}; +void hw_intr_used(int irq){}; +void hw_intr_not_used(int irq){}; +void hw_intr_disable_all(){}; diff --git a/minix/kernel/arch/earm/include/hw_intr.h b/minix/kernel/arch/earm/include/hw_intr.h index f9eabc72f..8f26e85cc 100644 --- a/minix/kernel/arch/earm/include/hw_intr.h +++ b/minix/kernel/arch/earm/include/hw_intr.h @@ -5,11 +5,11 @@ #include "kernel/kernel.h" void irq_handle(int irq); -int hw_intr_mask(int irq); -int hw_intr_unmask(int irq); -int hw_intr_ack(int irq); -int hw_intr_used(int irq); -int hw_intr_not_used(int irq); -int hw_intr_disable_all(); +void hw_intr_mask(int irq); +void hw_intr_unmask(int irq); +void hw_intr_ack(int irq); +void hw_intr_used(int irq); +void hw_intr_not_used(int irq); +void hw_intr_disable_all(); #endif /* __HW_INTR_ARM_H__ */ diff --git a/minix/kernel/arch/earm/pre_init.c b/minix/kernel/arch/earm/pre_init.c index a7c757b8f..9411c4216 100644 --- a/minix/kernel/arch/earm/pre_init.c +++ b/minix/kernel/arch/earm/pre_init.c @@ -422,5 +422,5 @@ void minix_shutdown(minix_timer_t *t) { arch_shutdown(0); } void busy_delay_ms(int x) { } int raise(int n) { panic("raise(%d)\n", n); } int kern_phys_map_ptr( phys_bytes base_address, vir_bytes io_size, int vm_flags, -struct kern_phys_map * priv, vir_bytes ptr) {}; +struct kern_phys_map * priv, vir_bytes ptr) { return -1; }; struct machine machine; /* pre init stage machine */ diff --git a/minix/kernel/proc.c b/minix/kernel/proc.c index 3dff67ca5..eed0a1e90 100644 --- a/minix/kernel/proc.c +++ b/minix/kernel/proc.c @@ -1095,7 +1095,7 @@ int mini_notify( #define ASCOMPLAIN(caller, entry, field) \ printf("kernel:%s:%d: asyn failed for %s in %s " \ - "(%d/%d, tab 0x%lx)\n",__FILE__,__LINE__, \ + "(%d/%zu, tab 0x%lx)\n",__FILE__,__LINE__, \ field, caller->p_name, entry, priv(caller)->s_asynsize, priv(caller)->s_asyntab) #define A_RETR_FLD(entry, field) \ diff --git a/minix/net/inet/Makefile b/minix/net/inet/Makefile index fa8ec057c..ebc727efc 100644 --- a/minix/net/inet/Makefile +++ b/minix/net/inet/Makefile @@ -14,6 +14,8 @@ SRCS= buf.c clock.c inet.c inet_config.c \ WARNS= +NOCLANGERROR=yes + DPADD+= ${LIBCHARDRIVER} ${LIBSYS} LDADD+= -lchardriver -lsys diff --git a/minix/net/inet/buf.c b/minix/net/inet/buf.c index 5a2f20dff..28d948454 100644 --- a/minix/net/inet/buf.c +++ b/minix/net/inet/buf.c @@ -1149,7 +1149,7 @@ acc_t *acc; } if (acc->acc_offset + acc->acc_length > buffer->buf_size) { - printf("%d + %d > %d for buffer %p, and acc %p\n", + printf("%d + %d > %zu for buffer %p, and acc %p\n", acc->acc_offset, acc->acc_length, buffer->buf_size, buffer, acc); return 0; diff --git a/minix/net/inet/clock.c b/minix/net/inet/clock.c index fa51929db..51cad0145 100644 --- a/minix/net/inet/clock.c +++ b/minix/net/inet/clock.c @@ -54,7 +54,7 @@ clock_t tim; } else if (!curr_time) { - DBLOCK(0x20, printf("set_time: new time %lu < prev_time %lu\n", + DBLOCK(0x20, printf("set_time: new time %u < prev_time %u\n", tim, prev_time)); } } diff --git a/minix/net/inet/generic/buf.h b/minix/net/inet/generic/buf.h index 8f508aad6..49a0838b4 100644 --- a/minix/net/inet/generic/buf.h +++ b/minix/net/inet/generic/buf.h @@ -134,10 +134,10 @@ void bf_logon ARGS(( bf_freereq_t func, bf_checkreq_t checkfunc )); #endif #ifndef BUF_TRACK_ALLOC_FREE -acc_t *bf_memreq ARGS(( unsigned size)); +acc_t *bf_memreq ARGS(( size_t size)); #else acc_t *_bf_memreq ARGS(( char *clnt_file, int clnt_line, - unsigned size)); + size_t size)); #endif /* the result is an acc with linkC == 1 */ diff --git a/minix/servers/is/dmp_ds.c b/minix/servers/is/dmp_ds.c index 843a41636..55da783ee 100644 --- a/minix/servers/is/dmp_ds.c +++ b/minix/servers/is/dmp_ds.c @@ -32,7 +32,7 @@ void data_store_dmp() printf("%-10s %12s\n", "STR", (char*) p->u.mem.data); break; case DSF_TYPE_MEM: - printf("%-10s %12u\n", "MEM", p->u.mem.length); + printf("%-10s %12zu\n", "MEM", p->u.mem.length); break; case DSF_TYPE_LABEL: printf("%-10s %12u\n", "LABEL", p->u.u32); diff --git a/minix/servers/rs/exec.c b/minix/servers/rs/exec.c index f72d0e598..1e2c75d91 100644 --- a/minix/servers/rs/exec.c +++ b/minix/servers/rs/exec.c @@ -163,7 +163,7 @@ size_t seg_bytes /* how much is to be transferred? */ if((r= sys_datacopy(SELF, ((vir_bytes)execi->hdr)+off, execi->proc_e, seg_addr, seg_bytes)) != OK) { printf("RS: exec read_seg: copy 0x%x bytes into %i at 0x%08lx failed: %i\n", - seg_bytes, execi->proc_e, seg_addr, r); + (int) seg_bytes, execi->proc_e, seg_addr, r); } return r; } diff --git a/minix/servers/rs/manager.c b/minix/servers/rs/manager.c index 9adf386c3..57b8b8a35 100644 --- a/minix/servers/rs/manager.c +++ b/minix/servers/rs/manager.c @@ -1285,7 +1285,7 @@ struct rproc *rp; rp->r_exec= malloc(rp->r_exec_len); if (rp->r_exec == NULL) { - printf("RS: read_exec: unable to allocate %d bytes\n", + printf("RS: read_exec: unable to allocate %zu bytes\n", rp->r_exec_len); close(fd); return ENOMEM; @@ -1951,7 +1951,7 @@ char *caller_label; { printf( "rs:get_next_name: bad ipc list entry '%.*s' for %s: too long\n", - len, p, caller_label); + (int) len, p, caller_label); continue; } memcpy(name, p, len); diff --git a/minix/servers/vfs/dmap.c b/minix/servers/vfs/dmap.c index 01bcce099..67d03ca44 100644 --- a/minix/servers/vfs/dmap.c +++ b/minix/servers/vfs/dmap.c @@ -88,7 +88,7 @@ static int map_driver(const char label[LABEL_MAX], devmajor_t major, if (label != NULL) { len = strlen(label); if (len+1 > sizeof(dp->dmap_label)) { - printf("VFS: map_driver: label too long: %d\n", len); + printf("VFS: map_driver: label too long: %zu\n", len); return(EINVAL); } strlcpy(dp->dmap_label, label, sizeof(dp->dmap_label)); diff --git a/minix/servers/vfs/exec.c b/minix/servers/vfs/exec.c index 3a7a5c5d2..4a371a4fe 100644 --- a/minix/servers/vfs/exec.c +++ b/minix/servers/vfs/exec.c @@ -545,7 +545,7 @@ vir_bytes *vsp; int n, r; off_t pos, new_pos; char *sp, *interp = NULL; - unsigned int cum_io; + size_t cum_io; char buf[PAGE_SIZE]; /* Make 'path' the new argv[0]. */ @@ -645,7 +645,7 @@ static int insert_arg(char stack[ARG_MAX], size_t *stk_bytes, char *arg, /* The stack will grow (or shrink) by offset bytes. */ if ((*stk_bytes += offset) > ARG_MAX) { - printf("vfs:: offset too big!! %d (max %d)\n", *stk_bytes, + printf("vfs:: offset too big!! %zu (max %d)\n", *stk_bytes, ARG_MAX); return FALSE; } @@ -693,7 +693,7 @@ static int read_seg(struct exec_info *execi, off_t off, vir_bytes seg_addr, size */ int r; off_t new_pos; - unsigned int cum_io; + size_t cum_io; struct vnode *vp = ((struct vfs_exec_info *) execi->opaque)->vp; /* Make sure that the file is big enough */ @@ -735,7 +735,7 @@ static void clo_exec(struct fproc *rfp) static int map_header(struct vfs_exec_info *execi) { int r; - unsigned int cum_io; + size_t cum_io; off_t pos, new_pos; static char hdr[PAGE_SIZE]; /* Assume that header is not larger than a page */ diff --git a/minix/servers/vfs/proto.h b/minix/servers/vfs/proto.h index 62f622508..21c2b03a5 100644 --- a/minix/servers/vfs/proto.h +++ b/minix/servers/vfs/proto.h @@ -199,7 +199,7 @@ int rw_pipe(int rw_flag, endpoint_t usr, struct filp *f, vir_bytes buf, /* request.c */ int req_breadwrite(endpoint_t fs_e, endpoint_t user_e, dev_t dev, off_t pos, unsigned int num_of_bytes, vir_bytes user_addr, int rw_flag, - off_t *new_posp, unsigned int *cum_iop); + off_t *new_posp, size_t *cum_iop); int req_chmod(endpoint_t fs_e, ino_t inode_nr, mode_t rmode, mode_t *new_modep); int req_chown(endpoint_t fs_e, ino_t inode_nr, uid_t newuid, gid_t newgid, @@ -231,7 +231,7 @@ int req_readsuper(struct vmnt *vmp, char *driver_name, dev_t dev, int readonly, int isroot, struct node_details *res_nodep, unsigned int *fs_flags); int req_readwrite(endpoint_t fs_e, ino_t inode_nr, off_t pos, int rw_flag, endpoint_t user_e, vir_bytes user_addr, unsigned int num_of_bytes, - off_t *new_posp, unsigned int *cum_iop); + off_t *new_posp, size_t *cum_iop); int req_bpeek(endpoint_t fs_e, dev_t dev, off_t pos, unsigned int num_of_bytes); int req_peek(endpoint_t fs_e, ino_t inode_nr, off_t pos, unsigned int bytes); int req_rename(endpoint_t fs_e, ino_t old_dir, char *old_name, ino_t new_dir, diff --git a/minix/servers/vfs/read.c b/minix/servers/vfs/read.c index 203c606b3..7f5ff144f 100644 --- a/minix/servers/vfs/read.c +++ b/minix/servers/vfs/read.c @@ -134,7 +134,8 @@ int read_write(struct fproc *rfp, int rw_flag, struct filp *f, { register struct vnode *vp; off_t position, res_pos; - unsigned int cum_io, cum_io_incr, res_cum_io; + size_t cum_io, res_cum_io; + size_t cum_io_incr; int op, r; dev_t dev; @@ -310,7 +311,8 @@ vir_bytes buf; size_t req_size; { int r, oflags, partial_pipe = 0; - size_t size, cum_io, cum_io_incr; + size_t size, cum_io; + size_t cum_io_incr; struct vnode *vp; off_t position, new_pos; diff --git a/minix/servers/vfs/request.c b/minix/servers/vfs/request.c index 7be99e384..9900c9163 100644 --- a/minix/servers/vfs/request.c +++ b/minix/servers/vfs/request.c @@ -29,7 +29,7 @@ *===========================================================================*/ static int req_breadwrite_actual(endpoint_t fs_e, endpoint_t user_e, dev_t dev, off_t pos, unsigned int num_of_bytes, vir_bytes user_addr, int rw_flag, - off_t *new_pos, unsigned int *cum_iop, int cpflag) + off_t *new_pos, size_t *cum_iop, int cpflag) { int r; cp_grant_id_t grant_id; @@ -61,7 +61,7 @@ static int req_breadwrite_actual(endpoint_t fs_e, endpoint_t user_e, dev_t dev, int req_breadwrite(endpoint_t fs_e, endpoint_t user_e, dev_t dev, off_t pos, unsigned int num_of_bytes, vir_bytes user_addr, int rw_flag, - off_t *new_pos, unsigned int *cum_iop) + off_t *new_pos, size_t *cum_iop) { int r; @@ -870,7 +870,7 @@ static int req_readwrite_actual(endpoint_t fs_e, ino_t inode_nr, off_t pos, *===========================================================================*/ int req_readwrite(endpoint_t fs_e, ino_t inode_nr, off_t pos, int rw_flag, endpoint_t user_e, vir_bytes user_addr, - unsigned int num_of_bytes, off_t *new_posp, unsigned int *cum_iop) + unsigned int num_of_bytes, off_t *new_posp, size_t *cum_iop) { int r; diff --git a/minix/servers/vm/mmap.c b/minix/servers/vm/mmap.c index f5e5f83fb..9d146bf99 100644 --- a/minix/servers/vm/mmap.c +++ b/minix/servers/vm/mmap.c @@ -235,7 +235,7 @@ int do_mmap(message *m) mem_type_t *mt = NULL; if(m->m_mmap.fd != -1) { - printf("VM: mmap: fd %d, len 0x%x\n", m->m_mmap.fd, len); + printf("VM: mmap: fd %d, len 0x%zx\n", m->m_mmap.fd, len); return EINVAL; } diff --git a/minix/tests/blocktest/blocktest.c b/minix/tests/blocktest/blocktest.c index 986a4ee77..5935a2b2f 100644 --- a/minix/tests/blocktest/blocktest.c +++ b/minix/tests/blocktest/blocktest.c @@ -107,7 +107,7 @@ static void *alloc_dma_memory(size_t size) MAP_PREALLOC | MAP_ANON, -1, 0); if (ptr == MAP_FAILED) - panic("unable to allocate %d bytes of memory", size); + panic("unable to allocate %zu bytes of memory", size); return ptr; } diff --git a/minix/usr.bin/trace/service/ipc.c b/minix/usr.bin/trace/service/ipc.c index 21368d950..d2984fc52 100644 --- a/minix/usr.bin/trace/service/ipc.c +++ b/minix/usr.bin/trace/service/ipc.c @@ -420,7 +420,7 @@ ipc_semop_out(struct trace_proc * proc, const message * m_out) put_value(proc, "semid", "%d", m_out->m_lc_ipc_semop.id); put_sembuf_array(proc, "sops", (vir_bytes)m_out->m_lc_ipc_semop.ops, m_out->m_lc_ipc_semop.size); - put_value(proc, "nsops", "%zu", m_out->m_lc_ipc_semop.size); + put_value(proc, "nsops", "%u", m_out->m_lc_ipc_semop.size); return CT_DONE; } diff --git a/minix/usr.bin/trace/service/pm.c b/minix/usr.bin/trace/service/pm.c index 15611235e..0656bdb94 100644 --- a/minix/usr.bin/trace/service/pm.c +++ b/minix/usr.bin/trace/service/pm.c @@ -972,7 +972,7 @@ pm_sysuname_out(struct trace_proc * proc, const message * m_out) put_buf(proc, "value", PF_STRING, m_out->m_lc_pm_sysuname.value, m_out->m_lc_pm_sysuname.len); - put_value(proc, "len", "%d", m_out->m_lc_pm_sysuname.len); + put_value(proc, "len", "%zu", m_out->m_lc_pm_sysuname.len); return CT_DONE; } @@ -984,7 +984,7 @@ pm_sysuname_in(struct trace_proc * proc, const message * m_out, if (m_out->m_lc_pm_sysuname.req == _UTS_GET) { put_buf(proc, "value", failed | PF_STRING, m_out->m_lc_pm_sysuname.value, m_in->m_type); - put_value(proc, "len", "%d", m_out->m_lc_pm_sysuname.len); + put_value(proc, "len", "%zu", m_out->m_lc_pm_sysuname.len); put_equals(proc); } put_result(proc); -- 2.44.0