Fixed gcc -Wall warnings.

This commit is contained in:
Cristiano Giuffrida 2010-04-08 15:02:32 +00:00
parent 1c8c8aa4d8
commit 98d1cf7064
3 changed files with 6 additions and 3 deletions

View file

@ -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) {

View file

@ -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);

View file

@ -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;
}