changeset 24174:10f268ec0d87

warning fix: mmap_anon.c: In function 'mmap_anon': mmap_anon.c:37: warning: unused variable 'fd'
author diego
date Sat, 25 Aug 2007 17:09:09 +0000
parents 49aa1cef1867
children 69b7fad52ecc
files osdep/mmap_anon.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/osdep/mmap_anon.c	Sat Aug 25 17:05:02 2007 +0000
+++ b/osdep/mmap_anon.c	Sat Aug 25 17:09:09 2007 +0000
@@ -34,7 +34,6 @@
  */
 void *mmap_anon(void *addr, size_t len, int prot, int flags, off_t offset)
 {
-    int fd;
     void *result;
 
      /* From loader/ext.c:
@@ -50,6 +49,7 @@
     result = mmap(addr, len, prot, flags | MAP_ANONYMOUS, -1, offset);
 #else
     /* SysV-style anonymous mapping */
+    int fd;
     fd = open("/dev/zero", O_RDWR);
     if(fd < 0){
         perror( "Cannot open /dev/zero for READ+WRITE. Check permissions! error: ");