[MPlayer-cvslog] r24194 - trunk/osdep/mmap_anon.c
Reimar Döffinger
Reimar.Doeffinger at stud.uni-karlsruhe.de
Sat Aug 25 19:25:14 CEST 2007
Hello,
On Sat, Aug 25, 2007 at 07:09:09PM +0200, diego wrote:
> Author: diego
> Date: Sat Aug 25 19:09:09 2007
> New Revision: 24194
>
> Log:
> warning fix:
> mmap_anon.c: In function 'mmap_anon':
> mmap_anon.c:37: warning: unused variable 'fd'
>
>
> Modified:
> trunk/osdep/mmap_anon.c
>
> Modified: trunk/osdep/mmap_anon.c
> ==============================================================================
> --- trunk/osdep/mmap_anon.c (original)
> +++ trunk/osdep/mmap_anon.c Sat Aug 25 19:09:09 2007
> @@ -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 @@ void *mmap_anon(void *addr, size_t len,
> 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: ");
Well, it was there to avoid problems with gcc 2.95.
No idea what kind of systems still do not have MAP_ANONYMOUS though.
Greetings,
Reimar Döffinger
More information about the MPlayer-cvslog
mailing list