From: Thomas Veerman Date: Fri, 2 Jul 2010 12:41:19 +0000 (+0000) Subject: Fix a few compile time warnings X-Git-Tag: v3.1.8~294 X-Git-Url: http://zhaoyanbai.com/repos/doc/roff.7.html?a=commitdiff_plain;h=34a2864e27e7c3a0fbf24fd48b63be8c129c026e;p=minix.git Fix a few compile time warnings --- diff --git a/servers/inet/generic/ip_eth.c b/servers/inet/generic/ip_eth.c index 3767bc57b..c92141012 100644 --- a/servers/inet/generic/ip_eth.c +++ b/servers/inet/generic/ip_eth.c @@ -251,6 +251,7 @@ int for_ioctl; printf("ip_port->ip_dl.dl_eth.de_state= 0x%x", ip_port->ip_dl.dl_eth.de_state); ip_panic (( "strange status" )); + return -1; } PRIVATE void ipeth_set_ipaddr(ip_port) diff --git a/servers/inet/generic/ip_read.c b/servers/inet/generic/ip_read.c index 377fd78a6..07655c9f1 100644 --- a/servers/inet/generic/ip_read.c +++ b/servers/inet/generic/ip_read.c @@ -417,7 +417,7 @@ size_t data_len; if (ip_fd->if_flags & IFF_SEL_READ) { - ip_fd->if_flags & ~IFF_SEL_READ; + ip_fd->if_flags &= ~IFF_SEL_READ; if (ip_fd->if_select_res) ip_fd->if_select_res(ip_fd->if_srfd, SR_SELECT_READ); diff --git a/servers/inet/generic/tcp.c b/servers/inet/generic/tcp.c index 25e686a6a..6f060680c 100644 --- a/servers/inet/generic/tcp.c +++ b/servers/inet/generic/tcp.c @@ -2335,7 +2335,7 @@ tcp_fd_t *tcp_fd; dst_fd->tf_conn != NULL || !(dst_fd->tf_flags & TFF_COOKIE)) { - printf("tcp_acceptto: bad flags 0x%x or conn %p for fd %d\n", + printf("tcp_acceptto: bad flags 0x%lx or conn %p for fd %d\n", dst_fd->tf_flags, dst_fd->tf_conn, dst_nr); tcp_reply_ioctl(tcp_fd, EINVAL); return NW_OK; diff --git a/servers/inet/generic/tcp_lib.c b/servers/inet/generic/tcp_lib.c index ddd849e44..558b11311 100644 --- a/servers/inet/generic/tcp_lib.c +++ b/servers/inet/generic/tcp_lib.c @@ -580,7 +580,7 @@ tcp_conn_t *tcp_conn; printf("tc_fd NULL"); else { - printf("tc_fd #%d: flags 0x%x, r %u@%u, w %u@%u", + printf("tc_fd #%d: flags 0x%lx, r %u@%u, w %u@%u", tcp_fd-tcp_fd_table, tcp_fd->tf_flags, tcp_fd->tf_read_count, tcp_fd->tf_read_offset, tcp_fd->tf_write_count, tcp_fd->tf_write_offset); diff --git a/servers/inet/qp.c b/servers/inet/qp.c index c6bc310ca..8f47c4096 100644 --- a/servers/inet/qp.c +++ b/servers/inet/qp.c @@ -227,6 +227,7 @@ int fd; int which_operation; { ip_panic(( "qp_cancel: should not be here, no blocking calls" )); + return OK; } PRIVATE int qp_select(fd, operations) diff --git a/servers/inet/sr.c b/servers/inet/sr.c index 8cd39d8c1..f6d147f25 100644 --- a/servers/inet/sr.c +++ b/servers/inet/sr.c @@ -487,7 +487,9 @@ message *m; ip_panic(( "request not found: from %d, type %d, MINOR= %d, PROC= %d, REF= %d", m->m_source, m->m_type, m->DEVICE, - m->IO_ENDPT, m->IO_GRANT)); + m->IO_ENDPT, (int) m->IO_GRANT)); + + return result; } PRIVATE int sr_select(m) diff --git a/servers/ipc/shm.c b/servers/ipc/shm.c index 550cda8be..298e4c717 100644 --- a/servers/ipc/shm.c +++ b/servers/ipc/shm.c @@ -332,7 +332,7 @@ PRIVATE void list_shm_ds(void) int i; printf("key\tid\tpage\n"); for (i = 0; i < shm_list_nr; i++) - printf("%d\t%d\t%x\n", + printf("%ld\t%d\t%lx\n", shm_list[i].key, shm_list[i].id, shm_list[i].page); diff --git a/servers/is/dmp_kernel.c b/servers/is/dmp_kernel.c index 923b74c36..3c610f5c7 100644 --- a/servers/is/dmp_kernel.c +++ b/servers/is/dmp_kernel.c @@ -81,7 +81,7 @@ PUBLIC void timing_dmp() int w; if (!timingdata[c].lock_timings[b]) continue; - x += (w = printf(" %5d: %5d", timingdata[c].lock_timings_range[0] + + x += (w = printf(" %5lu: %5lu", timingdata[c].lock_timings_range[0] + b*timingdata[c].binsize, timingdata[c].lock_timings[b])); if (x + w >= 80) { printf("\n"); x = 0; } @@ -187,7 +187,7 @@ PUBLIC void irqtab_dmp() printf("%10d ", e->proc_nr_e); printf(" (%02d) ", e->irq); printf(" %s", (e->policy & IRQ_REENABLE) ? "reenable" : " - "); - printf(" %4d", e->notify_id); + printf(" %4lu", e->notify_id); if (irq_actids[e->irq] & e->id) printf(" masked"); printf("\n"); @@ -223,7 +223,7 @@ PUBLIC void image_dmp() printf("---name- -nr- flags -qs- -queue- -stack-\n"); for (m=0; mproc_name, ip->proc_nr, boot_flags_str(ip->flags), ip->quantum, ip->priority, ip->stksize); } @@ -256,15 +256,15 @@ PUBLIC void kenv_dmp() printf("- vdu_ega: %3d\n", machine.vdu_ega); printf("- vdu_vga: %3d\n\n", machine.vdu_vga); printf("Kernel info structure:\n"); - printf("- code_base: %5u\n", kinfo.code_base); - printf("- code_size: %5u\n", kinfo.code_size); - printf("- data_base: %5u\n", kinfo.data_base); - printf("- data_size: %5u\n", kinfo.data_size); - printf("- proc_addr: %5u\n", kinfo.proc_addr); - printf("- bootdev_base: %5u\n", kinfo.bootdev_base); - printf("- bootdev_size: %5u\n", kinfo.bootdev_size); - printf("- ramdev_base: %5u\n", kinfo.ramdev_base); - printf("- ramdev_size: %5u\n", kinfo.ramdev_size); + printf("- code_base: %5lu\n", kinfo.code_base); + printf("- code_size: %5lu\n", kinfo.code_size); + printf("- data_base: %5lu\n", kinfo.data_base); + printf("- data_size: %5lu\n", kinfo.data_size); + printf("- proc_addr: %5lu\n", kinfo.proc_addr); + printf("- bootdev_base: %5lu\n", kinfo.bootdev_base); + printf("- bootdev_size: %5lu\n", kinfo.bootdev_size); + printf("- ramdev_base: %5lu\n", kinfo.ramdev_base); + printf("- ramdev_size: %5lu\n", kinfo.ramdev_size); printf("- nr_procs: %3u\n", kinfo.nr_procs); printf("- nr_tasks: %3u\n", kinfo.nr_tasks); printf("- release: %.6s\n", kinfo.release); @@ -397,7 +397,7 @@ PUBLIC void proctab_dmp() size = rp->p_memmap[T].mem_len + ((rp->p_memmap[S].mem_phys + rp->p_memmap[S].mem_len) - data); printf(" %5d %10d ", _ENDPOINT_G(rp->p_endpoint), rp->p_endpoint); - printf("%-8.8s %5u %5lu %6lu %6lu ", + printf("%-8.8s %5u %5u %6lu %6lu ", rp->p_name, rp->p_priority, rp->p_quantum_size_ms, @@ -454,7 +454,7 @@ PUBLIC void memmap_dmp() size = rp->p_memmap[T].mem_len + ((rp->p_memmap[S].mem_phys + rp->p_memmap[S].mem_len) - rp->p_memmap[D].mem_phys); - printf("%-7.7s%7lx %8lx %4x %4x %4x %4x %5x %5x %8lx\n", + printf("%-7.7s%7lx %8lx %4x %4x %4x %4x %5x %5x %8lu\n", rp->p_name, (unsigned long) rp->p_reg.pc, (unsigned long) rp->p_reg.sp, diff --git a/servers/is/dmp_pm.c b/servers/is/dmp_pm.c index e2af97f36..ab757bc69 100644 --- a/servers/is/dmp_pm.c +++ b/servers/is/dmp_pm.c @@ -88,10 +88,10 @@ PUBLIC void sigaction_dmp() if (mp->mp_pid == 0 && i != PM_PROC_NR) continue; if (++n > 22) break; printf("%8.8s %3d ", mp->mp_name, i); - printf(" %08x %08x %08x ", + printf(" %08lx %08lx %08lx ", mp->mp_ignore, mp->mp_catch, mp->mp_sigmask); - printf("%08x ", mp->mp_sigpending); - if (mp->mp_flags & ALARM_ON) printf("%8u", mp->mp_timer.tmr_exp_time-uptime); + printf("%08lx ", mp->mp_sigpending); + if (mp->mp_flags & ALARM_ON) printf("%8ld", mp->mp_timer.tmr_exp_time-uptime); else printf(" -"); printf("\n"); } diff --git a/servers/is/dmp_rs.c b/servers/is/dmp_rs.c index fff8a1fb6..370a62e0f 100644 --- a/servers/is/dmp_rs.c +++ b/servers/is/dmp_rs.c @@ -39,7 +39,7 @@ PUBLIC void rproc_dmp() rpub = &rprocpub[i]; if (! (rp->r_flags & RS_IN_USE)) continue; if (++n > 22) break; - printf("%13s %9d %5d %6s %3d/%1d %3u %8u %5dx %s", + printf("%13s %9d %5d %6s %3d/%1d %3ld %8ld %5dx %s", rpub->label, rpub->endpoint, rp->r_pid, s_flags_str(rp->r_flags, rpub->sys_flags), rpub->dev_nr, rpub->dev_style, rpub->period, rp->r_alive_tm, rp->r_restarts, diff --git a/servers/iso9660fs/path.c b/servers/iso9660fs/path.c index e01d9732f..a338488f7 100644 --- a/servers/iso9660fs/path.c +++ b/servers/iso9660fs/path.c @@ -197,7 +197,7 @@ size_t *offsetp; /* Find starting inode inode according to the request message */ if ((start_dir = get_dir_record(dir_ino)) == NULL) { - printf("ISOFS: couldn't find starting inode %d\n", dir_ino); + printf("ISOFS: couldn't find starting inode %lu\n", dir_ino); return(ENOENT); } diff --git a/servers/mfs/inode.c b/servers/mfs/inode.c index 0469e1cf9..2476231ac 100644 --- a/servers/mfs/inode.c +++ b/servers/mfs/inode.c @@ -46,7 +46,7 @@ PUBLIC int fs_putnode(void) rip = find_inode(fs_dev, (ino_t) fs_m_in.REQ_INODE_NR); if(!rip) { - printf("%s:%d put_inode: inode #%ul dev: %d not found\n", __FILE__, + printf("%s:%d put_inode: inode #%lu dev: %d not found\n", __FILE__, __LINE__, (ino_t) fs_m_in.REQ_INODE_NR, fs_dev); panic("fs_putnode failed"); } diff --git a/servers/mfs/main.c b/servers/mfs/main.c index 61ed8dc7f..0cffb9001 100644 --- a/servers/mfs/main.c +++ b/servers/mfs/main.c @@ -196,7 +196,7 @@ PRIVATE void cch_check(void) req_nr != REQ_PUTNODE && req_nr != REQ_READSUPER && req_nr != REQ_MOUNTPOINT && req_nr != REQ_UNMOUNT && req_nr != REQ_SYNC && req_nr != REQ_LOOKUP) { - printf("MFS(%d) inode(%ul) cc: %d req_nr: %d\n", SELF_E, + printf("MFS(%d) inode(%lu) cc: %d req_nr: %d\n", SELF_E, inode[i].i_num, inode[i].i_count - cch[i], req_nr); } diff --git a/servers/pm/const.h b/servers/pm/const.h index 6e1c7bbe1..f286f535a 100644 --- a/servers/pm/const.h +++ b/servers/pm/const.h @@ -12,7 +12,8 @@ #define DUMPED 0200 /* bit set in status when core dumped */ -#define MAX_SECS (((1<<(sizeof(clock_t)*8-1))-1)/system_hz) +#define MAX_CLOCK_T ((unsigned long) 1 << ((sizeof(clock_t) * 8) - 1)) +#define MAX_SECS ( (clock_t) (MAX_CLOCK_T/system_hz) ) /* max.secs for setitimer() ((2^31-1)/HZ) */ #define NR_ITIMERS 3 /* number of supported interval timers */ diff --git a/servers/pm/exec.c b/servers/pm/exec.c index 58301763c..0b9b0df13 100644 --- a/servers/pm/exec.c +++ b/servers/pm/exec.c @@ -167,9 +167,9 @@ vir_bytes pc; */ for (sn = 1; sn < _NSIG; sn++) { if (sigismember(&rmp->mp_catch, sn)) { - sigdelset(&rmp->mp_catch, sn); + (void) sigdelset(&rmp->mp_catch, sn); rmp->mp_sigact[sn].sa_handler = SIG_DFL; - sigemptyset(&rmp->mp_sigact[sn].sa_mask); + (void) sigemptyset(&rmp->mp_sigact[sn].sa_mask); } } diff --git a/servers/pm/forkexit.c b/servers/pm/forkexit.c index 0ea6f51bb..a89836896 100644 --- a/servers/pm/forkexit.c +++ b/servers/pm/forkexit.c @@ -91,7 +91,7 @@ PUBLIC int do_fork() if (!(rmc->mp_trace_flags & TO_TRACEFORK)) { rmc->mp_tracer = NO_TRACER; /* no tracer attached */ rmc->mp_trace_flags = 0; - sigemptyset(&rmc->mp_sigtrace); + (void) sigemptyset(&rmc->mp_sigtrace); } /* Some system servers like to call regular fork, such as RS spawning @@ -187,7 +187,7 @@ PUBLIC int do_srv_fork() if (!(rmc->mp_trace_flags & TO_TRACEFORK)) { rmc->mp_tracer = NO_TRACER; /* no tracer attached */ rmc->mp_trace_flags = 0; - sigemptyset(&rmc->mp_sigtrace); + (void) sigemptyset(&rmc->mp_sigtrace); } /* inherit only these flags */ rmc->mp_flags &= (IN_USE|PRIV_PROC|DELAY_CALL); @@ -473,7 +473,7 @@ PUBLIC int do_waitpid() */ for (i = 1; i < _NSIG; i++) { if (sigismember(&rp->mp_sigtrace, i)) { - sigdelset(&rp->mp_sigtrace, i); + (void) sigdelset(&rp->mp_sigtrace, i); mp->mp_reply.reply_res2 = 0177 | (i << 8); diff --git a/servers/pm/main.c b/servers/pm/main.c index 17a9732e3..3142c4f88 100644 --- a/servers/pm/main.c +++ b/servers/pm/main.c @@ -207,15 +207,15 @@ PRIVATE int sef_cb_init_fresh(int type, sef_init_info_t *info) /* Build the set of signals which cause core dumps, and the set of signals * that are by default ignored. */ - sigemptyset(&core_sset); + (void) sigemptyset(&core_sset); for (sig_ptr = core_sigs; sig_ptr < core_sigs+sizeof(core_sigs); sig_ptr++) - sigaddset(&core_sset, *sig_ptr); - sigemptyset(&ign_sset); + (void) sigaddset(&core_sset, *sig_ptr); + (void) sigemptyset(&ign_sset); for (sig_ptr = ign_sigs; sig_ptr < ign_sigs+sizeof(ign_sigs); sig_ptr++) - sigaddset(&ign_sset, *sig_ptr); - sigemptyset(&noign_sset); + (void) sigaddset(&ign_sset, *sig_ptr); + (void) sigemptyset(&noign_sset); for (sig_ptr = noign_sigs; sig_ptr < noign_sigs+sizeof(noign_sigs); sig_ptr++) - sigaddset(&noign_sset, *sig_ptr); + (void) sigaddset(&noign_sset, *sig_ptr); /* Obtain a copy of the boot monitor parameters and the kernel info struct. * Parse the list of free memory chunks. This list is what the boot monitor @@ -240,9 +240,9 @@ PRIVATE int sef_cb_init_fresh(int type, sef_init_info_t *info) rmp = &mproc[ip->proc_nr]; strncpy(rmp->mp_name, ip->proc_name, PROC_NAME_LEN); rmp->mp_nice = get_nice_value(ip->priority); - sigemptyset(&rmp->mp_ignore); - sigemptyset(&rmp->mp_sigmask); - sigemptyset(&rmp->mp_catch); + (void) sigemptyset(&rmp->mp_ignore); + (void) sigemptyset(&rmp->mp_sigmask); + (void) sigemptyset(&rmp->mp_catch); if (ip->proc_nr == INIT_PROC_NR) { /* user process */ /* INIT is root, we make it father of itself. This is * not really OK, INIT should have no father, i.e. diff --git a/servers/pm/misc.c b/servers/pm/misc.c index 353c15a44..4efccf2ce 100644 --- a/servers/pm/misc.c +++ b/servers/pm/misc.c @@ -78,8 +78,8 @@ PUBLIC int do_procstat() if (m_in.stat_nr == SELF) { mp->mp_reply.sig_set = mp->mp_sigpending; - sigemptyset(&mp->mp_sigpending); - sigemptyset(&mp->mp_ksigpending); + (void) sigemptyset(&mp->mp_sigpending); + (void) sigemptyset(&mp->mp_ksigpending); } else { return(ENOSYS); diff --git a/servers/pm/signal.c b/servers/pm/signal.c index f097ce838..fce84ca9c 100644 --- a/servers/pm/signal.c +++ b/servers/pm/signal.c @@ -65,20 +65,20 @@ PUBLIC int do_sigaction() if (r != OK) return(r); if (svec.sa_handler == SIG_IGN) { - sigaddset(&mp->mp_ignore, m_in.sig_nr); - sigdelset(&mp->mp_sigpending, m_in.sig_nr); - sigdelset(&mp->mp_ksigpending, m_in.sig_nr); - sigdelset(&mp->mp_catch, m_in.sig_nr); + (void) sigaddset(&mp->mp_ignore, m_in.sig_nr); + (void) sigdelset(&mp->mp_sigpending, m_in.sig_nr); + (void) sigdelset(&mp->mp_ksigpending, m_in.sig_nr); + (void) sigdelset(&mp->mp_catch, m_in.sig_nr); } else if (svec.sa_handler == SIG_DFL) { - sigdelset(&mp->mp_ignore, m_in.sig_nr); - sigdelset(&mp->mp_catch, m_in.sig_nr); + (void) sigdelset(&mp->mp_ignore, m_in.sig_nr); + (void) sigdelset(&mp->mp_catch, m_in.sig_nr); } else { - sigdelset(&mp->mp_ignore, m_in.sig_nr); - sigaddset(&mp->mp_catch, m_in.sig_nr); + (void) sigdelset(&mp->mp_ignore, m_in.sig_nr); + (void) sigaddset(&mp->mp_catch, m_in.sig_nr); } mp->mp_sigact[m_in.sig_nr].sa_handler = svec.sa_handler; - sigdelset(&svec.sa_mask, SIGKILL); - sigdelset(&svec.sa_mask, SIGSTOP); + (void) sigdelset(&svec.sa_mask, SIGKILL); + (void) sigdelset(&svec.sa_mask, SIGSTOP); mp->mp_sigact[m_in.sig_nr].sa_mask = svec.sa_mask; mp->mp_sigact[m_in.sig_nr].sa_flags = svec.sa_flags; mp->mp_sigreturn = (vir_bytes) m_in.sig_ret; @@ -116,25 +116,25 @@ PUBLIC int do_sigprocmask() switch (m_in.sig_how) { case SIG_BLOCK: - sigdelset((sigset_t *)&m_in.sig_set, SIGKILL); - sigdelset((sigset_t *)&m_in.sig_set, SIGSTOP); + (void) sigdelset((sigset_t *)&m_in.sig_set, SIGKILL); + (void) sigdelset((sigset_t *)&m_in.sig_set, SIGSTOP); for (i = 1; i < _NSIG; i++) { if (sigismember((sigset_t *)&m_in.sig_set, i)) - sigaddset(&mp->mp_sigmask, i); + (void) sigaddset(&mp->mp_sigmask, i); } break; case SIG_UNBLOCK: for (i = 1; i < _NSIG; i++) { if (sigismember((sigset_t *)&m_in.sig_set, i)) - sigdelset(&mp->mp_sigmask, i); + (void) sigdelset(&mp->mp_sigmask, i); } check_pending(mp); break; case SIG_SETMASK: - sigdelset((sigset_t *) &m_in.sig_set, SIGKILL); - sigdelset((sigset_t *) &m_in.sig_set, SIGSTOP); + (void) sigdelset((sigset_t *) &m_in.sig_set, SIGKILL); + (void) sigdelset((sigset_t *) &m_in.sig_set, SIGSTOP); mp->mp_sigmask = (sigset_t) m_in.sig_set; check_pending(mp); break; @@ -156,8 +156,8 @@ PUBLIC int do_sigsuspend() { mp->mp_sigmask2 = mp->mp_sigmask; /* save the old mask */ mp->mp_sigmask = (sigset_t) m_in.sig_set; - sigdelset(&mp->mp_sigmask, SIGKILL); - sigdelset(&mp->mp_sigmask, SIGSTOP); + (void) sigdelset(&mp->mp_sigmask, SIGKILL); + (void) sigdelset(&mp->mp_sigmask, SIGSTOP); mp->mp_flags |= SIGSUSPENDED; check_pending(mp); return(SUSPEND); @@ -175,8 +175,8 @@ PUBLIC int do_sigreturn() int r; mp->mp_sigmask = (sigset_t) m_in.sig_set; - sigdelset(&mp->mp_sigmask, SIGKILL); - sigdelset(&mp->mp_sigmask, SIGSTOP); + (void) sigdelset(&mp->mp_sigmask, SIGKILL); + (void) sigdelset(&mp->mp_sigmask, SIGSTOP); r = sys_sigreturn(who_e, (struct sigmsg *) m_in.sig_context); check_pending(mp); @@ -338,7 +338,7 @@ int ksig; /* non-zero means signal comes from kernel */ * the process itself could block/ignore debugger signals. */ - sigaddset(&rmp->mp_sigtrace, signo); + (void) sigaddset(&rmp->mp_sigtrace, signo); if (!(rmp->mp_flags & STOPPED)) stop_proc(rmp, signo); /* a signal causes it to stop */ @@ -347,8 +347,9 @@ int ksig; /* non-zero means signal comes from kernel */ } if (rmp->mp_flags & VFS_CALL) { - sigaddset(&rmp->mp_sigpending, signo); - if(ksig) sigaddset(&rmp->mp_ksigpending, signo); + (void) sigaddset(&rmp->mp_sigpending, signo); + if(ksig) + (void) sigaddset(&rmp->mp_ksigpending, signo); if (!(rmp->mp_flags & PM_SIG_PENDING)) { /* No delay calls: VFS_CALL implies the process called us. */ @@ -407,8 +408,9 @@ int ksig; /* non-zero means signal comes from kernel */ } if (!badignore && sigismember(&rmp->mp_sigmask, signo)) { /* Signal should be blocked. */ - sigaddset(&rmp->mp_sigpending, signo); - if(ksig) sigaddset(&rmp->mp_ksigpending, signo); + (void) sigaddset(&rmp->mp_sigpending, signo); + if(ksig) + (void) sigaddset(&rmp->mp_ksigpending, signo); return; } @@ -417,8 +419,9 @@ int ksig; /* non-zero means signal comes from kernel */ * (except SIGKILL) in order not to confuse the debugger. The signals * will be delivered using the check_pending() calls in do_trace(). */ - sigaddset(&rmp->mp_sigpending, signo); - if(ksig) sigaddset(&rmp->mp_ksigpending, signo); + (void) sigaddset(&rmp->mp_sigpending, signo); + if(ksig) + (void) sigaddset(&rmp->mp_ksigpending, signo); return; } if (!badignore && sigismember(&rmp->mp_catch, signo)) { @@ -431,8 +434,9 @@ int ksig; /* non-zero means signal comes from kernel */ if (!(rmp->mp_flags & UNPAUSED)) { /* not yet unpaused; continue later */ - sigaddset(&rmp->mp_sigpending, signo); - if(ksig) sigaddset(&rmp->mp_ksigpending, signo); + (void) sigaddset(&rmp->mp_sigpending, signo); + if(ksig) + (void) sigaddset(&rmp->mp_ksigpending, signo); return; } @@ -575,8 +579,8 @@ register struct mproc *rmp; if (sigismember(&rmp->mp_sigpending, i) && !sigismember(&rmp->mp_sigmask, i)) { ksig = sigismember(&rmp->mp_ksigpending, i); - sigdelset(&rmp->mp_sigpending, i); - sigdelset(&rmp->mp_ksigpending, i); + (void) sigdelset(&rmp->mp_sigpending, i); + (void) sigdelset(&rmp->mp_ksigpending, i); sig_proc(rmp, i, FALSE /*trace*/, ksig); if (rmp->mp_flags & VFS_CALL) @@ -710,16 +714,16 @@ int signo; /* signal to send to process (1 to _NSIG-1) */ rmp->mp_sigmask |= rmp->mp_sigact[signo].sa_mask; if (sigflags & SA_NODEFER) - sigdelset(&rmp->mp_sigmask, signo); + (void) sigdelset(&rmp->mp_sigmask, signo); else - sigaddset(&rmp->mp_sigmask, signo); + (void) sigaddset(&rmp->mp_sigmask, signo); if (sigflags & SA_RESETHAND) { - sigdelset(&rmp->mp_catch, signo); + (void) sigdelset(&rmp->mp_catch, signo); rmp->mp_sigact[signo].sa_handler = SIG_DFL; } - sigdelset(&rmp->mp_sigpending, signo); - sigdelset(&rmp->mp_ksigpending, signo); + (void) sigdelset(&rmp->mp_sigpending, signo); + (void) sigdelset(&rmp->mp_ksigpending, signo); if(vm_push_sig(rmp->mp_endpoint, &cur_sp) != OK) return(FALSE); diff --git a/servers/pm/trace.c b/servers/pm/trace.c index bf02d2d33..b6893a610 100644 --- a/servers/pm/trace.c +++ b/servers/pm/trace.c @@ -191,7 +191,7 @@ PUBLIC int do_trace() /* Let all tracer-pending signals through the filter. */ for (i = 1; i < _NSIG; i++) { if (sigismember(&child->mp_sigtrace, i)) { - sigdelset(&child->mp_sigtrace, i); + (void) sigdelset(&child->mp_sigtrace, i); check_sig(child->mp_pid, i, FALSE /* ksig */); } } @@ -259,7 +259,7 @@ int signo; rmp->mp_flags |= STOPPED; if (wait_test(rpmp, rmp)) { - sigdelset(&rmp->mp_sigtrace, signo); + (void) sigdelset(&rmp->mp_sigtrace, signo); rpmp->mp_flags &= ~WAITING; /* parent is no longer waiting */ rpmp->mp_reply.reply_res2 = 0177 | (signo << 8); diff --git a/servers/sched/schedule.c b/servers/sched/schedule.c index b3e56486e..9ed806d35 100644 --- a/servers/sched/schedule.c +++ b/servers/sched/schedule.c @@ -63,8 +63,8 @@ PUBLIC int do_stop_scheduling(message *m_ptr) return EPERM; if (sched_isokendpt(m_ptr->SCHEDULING_ENDPOINT, &proc_nr_n) != OK) { - printf("SCHED: WARNING: got an invalid endpoint in OOQ msg %u.\n", - m_ptr->SCHEDULING_ENDPOINT); + printf("SCHED: WARNING: got an invalid endpoint in OOQ msg " + "%ld\n", m_ptr->SCHEDULING_ENDPOINT); return EBADEPT; } @@ -175,8 +175,8 @@ PUBLIC int do_nice(message *m_ptr) return EPERM; if (sched_isokendpt(m_ptr->SCHEDULING_ENDPOINT, &proc_nr_n) != OK) { - printf("SCHED: WARNING: got an invalid endpoint in OOQ msg %u.\n", - m_ptr->SCHEDULING_ENDPOINT); + printf("SCHED: WARNING: got an invalid endpoint in OOQ msg " + "%ld\n", m_ptr->SCHEDULING_ENDPOINT); return EBADEPT; } diff --git a/servers/vfs/exec.c b/servers/vfs/exec.c index ef0835726..334f1f097 100644 --- a/servers/vfs/exec.c +++ b/servers/vfs/exec.c @@ -172,7 +172,7 @@ vir_bytes *pc; patch_ptr(mbuf, vsp); if ((r = sys_datacopy(SELF, (vir_bytes) mbuf, proc_e, (vir_bytes) vsp, (phys_bytes)frame_len)) != OK) { - printf("VFS: datacopy failed (%d) trying to copy to %p\n", r, vsp); + printf("VFS: datacopy failed (%d) trying to copy to %lu\n", r, vsp); return(r); } diff --git a/servers/vfs/misc.c b/servers/vfs/misc.c index 8cd9e7e30..f22c41372 100644 --- a/servers/vfs/misc.c +++ b/servers/vfs/misc.c @@ -384,11 +384,11 @@ int cpid; /* Child process id */ * as it isn't blocking on i/o. */ if(GRANT_VALID(fp->fp_grant)) { - printf("vfs: fork: fp (endpoint %d) has grant %d\n", fp->fp_endpoint, fp->fp_grant); + printf("vfs: fork: fp (endpoint %d) has grant %ld\n", fp->fp_endpoint, fp->fp_grant); panic("fp contains valid grant"); } if(GRANT_VALID(cp->fp_grant)) { - printf("vfs: fork: cp (endpoint %d) has grant %d\n", cp->fp_endpoint, cp->fp_grant); + printf("vfs: fork: cp (endpoint %d) has grant %ld\n", cp->fp_endpoint, cp->fp_grant); panic("cp contains valid grant"); } diff --git a/servers/vfs/protect.c b/servers/vfs/protect.c index e9ca0bd64..83b116944 100644 --- a/servers/vfs/protect.c +++ b/servers/vfs/protect.c @@ -18,7 +18,7 @@ #include "vnode.h" #include "vmnt.h" -FORWARD _PROTOTYPE( in_group, (gid_t grp) ); +FORWARD _PROTOTYPE( int in_group, (gid_t grp) ); /*===========================================================================* * do_chmod * diff --git a/servers/vfs/vnode.c b/servers/vfs/vnode.c index 3b07ef68a..b98ff2572 100644 --- a/servers/vfs/vnode.c +++ b/servers/vfs/vnode.c @@ -18,7 +18,7 @@ /* Is vnode pointer reasonable? */ #define SANEVP(v) ((((v) >= &vnode[0] && (v) < &vnode[NR_VNODES]))) -#define BADVP(v, f, l) printf("%s:%d: bad vp 0x%x\n", f, l, v) +#define BADVP(v, f, l) printf("%s:%d: bad vp %p\n", f, l, v) /* vp check that returns 0 for use in check_vrefs() */ #define CHECKVN(v) if(!SANEVP(v)) { \