# HG changeset patch # User diego # Date 1188061749 0 # Node ID 10f268ec0d87fdca15d6fd975b68f8ee26aa35d2 # Parent 49aa1cef1867eff8268d14a636d3cb56f8c8a435 warning fix: mmap_anon.c: In function 'mmap_anon': mmap_anon.c:37: warning: unused variable 'fd' diff -r 49aa1cef1867 -r 10f268ec0d87 osdep/mmap_anon.c --- 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: ");