1
mirror of https://github.com/mpv-player/mpv synced 2024-07-31 16:29:58 +02:00

warning fix:

mmap_anon.c: In function 'mmap_anon':
mmap_anon.c:37: warning: unused variable 'fd'


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24194 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
diego 2007-08-25 17:09:09 +00:00
parent 825bfaf480
commit fd16e2f2df

View File

@ -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, int prot, int flags, off_t offset)
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: ");