Fix warnings due to the declaration of serialize_*
authorBarret Rhoden <brho@cs.berkeley.edu>
Thu, 4 Feb 2016 02:46:52 +0000 (21:46 -0500)
committerBarret Rhoden <brho@cs.berkeley.edu>
Thu, 4 Feb 2016 22:39:26 +0000 (17:39 -0500)
We missed these in commit 1fe2ed47726f ("Fix parameter types for
sys_proc_create() (XCC)").

Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
tests/childfdmap.c
tests/serialize_test.c

index a7b412d..494fafb 100644 (file)
@@ -59,8 +59,7 @@ int main(int argc, char *argv[])
        child_argv[1] = "1"; /* dummy arg, signal so we know they're the child */
        child_argv[2] = 0;
 
-       kid = sys_proc_create(filename, strlen(filename),
-                                                 (const char * const *) child_argv, NULL, 0);
+       kid = sys_proc_create(filename, strlen(filename), child_argv, NULL, 0);
        if (kid < 0) {
                perror("create failed");
                exit(1);
index 128c618..09f4cfe 100644 (file)
@@ -8,14 +8,13 @@
 
 int main(int argc, char **argv, char **envp)
 {
-       struct serialized_data *sd =
-               serialize_argv_envp((const char * const *) argv,
-                                                       (const char * const *) envp);
+       struct serialized_data *sd = serialize_argv_envp(argv, envp);
        size_t *kargc = (size_t*)sd->buf;
        size_t *kenvc = (size_t*)(sd->buf + sizeof(size_t));
        char **kargv = (char**)(sd->buf + 2*sizeof(size_t));
        char **kenvp = (char**)(kargv + *kargc);
        uintptr_t bufbase = (uintptr_t)(kenvp + *kenvc);
+
        printf("argc: %lu\n", *kargc);
        printf("envc: %lu\n", *kenvc);
        for (int i = 0; i < *kargc; i++)