From: Cristiano Giuffrida Date: Thu, 8 Apr 2010 15:02:32 +0000 (+0000) Subject: Fixed gcc -Wall warnings. X-Git-Tag: v3.1.7~167 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/Bv9ARM.ch05.html?a=commitdiff_plain;h=98d1cf7064546fb8c5eee04f9d925f0d3d080850;p=minix.git Fixed gcc -Wall warnings. --- diff --git a/servers/rs/main.c b/servers/rs/main.c index d94d453a5..b514c39a1 100644 --- a/servers/rs/main.c +++ b/servers/rs/main.c @@ -561,6 +561,7 @@ struct rproc *rp; } /* Get a.out header. */ + s = ENOMEM; if(boot_image_buffer+boot_image_buffer_size - boot_image_ptr < sizeof(header) || (s = sys_getaoutheader(&header, boot_proc_idx)) != OK) { panic("unable to get copy of a.out header: %d", s); @@ -569,6 +570,7 @@ struct rproc *rp; boot_image_ptr += header.a_hdrlen; /* Get text segment. */ + s = ENOMEM; if(boot_image_buffer+boot_image_buffer_size - boot_image_ptr < header.a_text || (s = rs_startup_segcopy(ip->endpoint, T, D, (vir_bytes) boot_image_ptr, header.a_text)) != OK) { @@ -577,6 +579,7 @@ struct rproc *rp; boot_image_ptr += header.a_text; /* Get data segment. */ + s = ENOMEM; if(boot_image_buffer+boot_image_buffer_size - boot_image_ptr < header.a_data || (s = rs_startup_segcopy(ip->endpoint, D, D, (vir_bytes) boot_image_ptr, header.a_data)) != OK) { diff --git a/servers/rs/manager.c b/servers/rs/manager.c index 956004ea0..b419f8fa8 100644 --- a/servers/rs/manager.c +++ b/servers/rs/manager.c @@ -913,7 +913,7 @@ PRIVATE int run_script(struct rproc *rp) return kill_service(rp, "unable to fork script", errno); case 0: execle(rp->r_script, rp->r_script, rpub->label, reason, - incarnation_str, NULL, envp, (char*)NULL); + incarnation_str, (char*) NULL, envp); printf("RS: run_script: execl '%s' failed: %s\n", rp->r_script, strerror(errno)); exit(1); diff --git a/servers/rs/service/service.c b/servers/rs/service/service.c index 60383e47c..8c9fd7e39 100644 --- a/servers/rs/service/service.c +++ b/servers/rs/service/service.c @@ -242,7 +242,7 @@ PRIVATE int parse_arguments(int argc, char **argv) SIU_SYSTEMHZ, sizeof(system_hz), &system_hz) < 0) { system_hz = DEFAULT_HZ; fprintf(stderr, "WARNING: reverting to default HZ %d\n", - system_hz); + (int) system_hz); } /* Check optional arguments that come in pairs like "-args arglist". */ @@ -858,7 +858,7 @@ PRIVATE void do_control(config_t *cpe) nr_control+1); } - rs_start.rss_control[nr_control].l_addr = cpe->word; + rs_start.rss_control[nr_control].l_addr = (char*) cpe->word; rs_start.rss_control[nr_control].l_len = strlen(cpe->word); rs_start.rss_nr_control = ++nr_control; }