]> Zhao Yanbai Git Server - minix.git/commitdiff
Fixed gcc -Wall warnings.
authorCristiano Giuffrida <cristiano@minix3.org>
Thu, 8 Apr 2010 15:02:32 +0000 (15:02 +0000)
committerCristiano Giuffrida <cristiano@minix3.org>
Thu, 8 Apr 2010 15:02:32 +0000 (15:02 +0000)
servers/rs/main.c
servers/rs/manager.c
servers/rs/service/service.c

index d94d453a536365c59404312bf246de7d20e230d4..b514c39a1c6647fa1aa2f14961a1855dc461a91a 100644 (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) {
index 956004ea02ad518714dc3d559644eeabc9ae894f..b419f8fa889bb4daf3de9b0a83ff629bef7103ea 100644 (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);
index 60383e47c618e6c73b41d0ecbb361d7442ef724e..8c9fd7e39c439aa4d8a09185740f1618da9e37fd 100644 (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;
        }