mirror of
https://github.com/mpv-player/mpv
synced 2024-10-18 10:25:02 +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:
parent
825bfaf480
commit
fd16e2f2df
@ -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: ");
|
||||
|
Loading…
Reference in New Issue
Block a user