commit-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[hurd] 50/75: fix compiler warnings in hurd/procfs


From: Samuel Thibault
Subject: [hurd] 50/75: fix compiler warnings in hurd/procfs
Date: Thu, 14 Jan 2016 01:04:10 +0000

This is an automated email from the git hooks/post-receive script.

sthibault pushed a commit to branch dde
in repository hurd.

commit e914bfc3d6e5ddf6f8c5e93a4334873a48a24ddf
Author: Flavio Cruz <address@hidden>
Date:   Tue Dec 29 23:11:26 2015 +0100

    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.
---
 include/sys/procfs.h |  4 ++--
 procfs/process.c     |  4 ++--
 procfs/rootdir.c     | 10 +++++-----
 3 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/include/sys/procfs.h b/include/sys/procfs.h
index ec82308..09d2030 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 2255bcd..ece37b7 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 d68645e..1e9ec8f 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;
 

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-hurd/hurd.git



reply via email to

[Prev in Thread] Current Thread [Next in Thread]