summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlavio Cruz <flaviocruz@gmail.com>2015-12-29 23:11:26 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2015-12-29 23:18:19 +0100
commite914bfc3d6e5ddf6f8c5e93a4334873a48a24ddf (patch)
tree59c072d1689d526e7799d7fe8d8fe914a50162a6
parentd73d717ecac42457f12a2d843454ecda3aa7b004 (diff)
fix compiler warnings in hurd/procfs
procfs: Fix compiler warnings. * include/sys/procfs.h: Change uintptr_t to vm_address_t. * procfs/process.c: Fix format strings. * procfs/rootdir.c: Add missing casts.
-rw-r--r--include/sys/procfs.h4
-rw-r--r--procfs/process.c4
-rw-r--r--procfs/rootdir.c10
3 files changed, 9 insertions, 9 deletions
diff --git a/include/sys/procfs.h b/include/sys/procfs.h
index ec82308b..09d2030c 100644
--- a/include/sys/procfs.h
+++ b/include/sys/procfs.h
@@ -63,8 +63,8 @@ struct elf_psinfo
char pr_psargs[ELF_PRARGSZ]; /* Initial part of argument list. */
int pr_wstat; /* Zombie exit status (not really used). */
int pr_argc; /* The argument count at startup. */
- uintptr_t pr_argv; /* Original argument vector address. */
- uintptr_t pr_envp; /* Original environment vector address. */
+ vm_address_t pr_argv; /* Original argument vector address. */
+ vm_address_t pr_envp; /* Original environment vector address. */
};
typedef struct elf_psinfo psinfo_t;
diff --git a/procfs/process.c b/procfs/process.c
index 2255bcdc..ece37b70 100644
--- a/procfs/process.c
+++ b/procfs/process.c
@@ -149,7 +149,7 @@ process_file_gc_maps (struct proc_stat *ps, char **contents)
if (err)
break;
- fprintf (s, "%0*x-%0*x %c%c%c%c %0*x %s %d ",
+ fprintf (s, "%0*lx-%0*lx %c%c%c%c %0*lx %s %d ",
/* Address range. */
2*sizeof s, addr,
2*sizeof s, addr + size,
@@ -178,7 +178,7 @@ process_file_gc_maps (struct proc_stat *ps, char **contents)
else
mach_port_deallocate (mach_task_self (), obj);
- fprintf (s, "[mem_obj=%d]\n", obj);
+ fprintf (s, "[mem_obj=%lu]\n", obj);
}
else
fprintf (s, "\n");
diff --git a/procfs/rootdir.c b/procfs/rootdir.c
index d68645e1..1e9ec8f3 100644
--- a/procfs/rootdir.c
+++ b/procfs/rootdir.c
@@ -432,7 +432,7 @@ rootdir_gc_slabinfo (void *hook, char **contents, ssize_t *contents_len)
if (err)
return err;
- m = open_memstream (contents, contents_len);
+ m = open_memstream (contents, (size_t *) contents_len);
if (m == NULL)
{
err = ENOMEM;
@@ -467,8 +467,8 @@ rootdir_gc_slabinfo (void *hook, char **contents, ssize_t *contents_len)
fclose (m);
out:
- vm_deallocate (mach_task_self (),
- cache_info, cache_info_count * sizeof *cache_info);
+ vm_deallocate (mach_task_self (), (vm_address_t) cache_info,
+ cache_info_count * sizeof *cache_info);
return err;
}
@@ -481,7 +481,7 @@ rootdir_gc_filesystems (void *hook, char **contents, ssize_t *contents_len)
glob_t matches;
FILE *m;
- m = open_memstream (contents, contents_len);
+ m = open_memstream (contents, (size_t *) contents_len);
if (m == NULL)
return errno;
@@ -574,7 +574,7 @@ rootdir_make_translated_node (void *dir_hook, const void *entry_hook)
return np;
}
- np = procfs_make_node (entry_hook, entry_hook);
+ np = procfs_make_node (entry_hook, (void *) entry_hook);
if (np == NULL)
return NULL;