1
mirror of https://github.com/mpv-player/mpv synced 2025-03-26 22:42:47 +01:00

compiler warning fixes by Domink and some other changes by me

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@9220 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
alex 2003-02-02 12:27:35 +00:00
parent e3f98b9dda
commit 10e2457f2e

@ -88,7 +88,9 @@ void *map_phys_mem(unsigned long base, unsigned long size)
#endif #endif
#ifdef CONFIG_DHAHELPER #ifdef CONFIG_DHAHELPER
#ifdef CONFIG_SVGAHELPER
dha_helper_way: dha_helper_way:
#endif
if ( (mem_fd = open("/dev/dhahelper",O_RDWR)) < 0) if ( (mem_fd = open("/dev/dhahelper",O_RDWR)) < 0)
{ {
perror("libdha: DHA kernelhelper failed"); perror("libdha: DHA kernelhelper failed");
@ -118,22 +120,22 @@ dev_mem_way:
if ( (mem_fd = open(DEV_MEM,O_RDWR)) == -1) if ( (mem_fd = open(DEV_MEM,O_RDWR)) == -1)
{ {
perror("libdha: opening /dev/mem failed"); perror("libdha: opening /dev/mem failed");
return -1; return MAP_FAILED;
} }
mmap: mmap:
return mmap(0,size,PROT_READ|PROT_WRITE,MAP_SHARED,mem_fd,base); return mmap(0,size,PROT_READ|PROT_WRITE,MAP_SHARED,mem_fd,base);
} }
#endif /* CONFIG_DHAHELPER */ #endif /* Generic mmap (not win32, nor os2) */
void unmap_phys_mem(void *ptr, unsigned long size) void unmap_phys_mem(void *ptr, unsigned long size)
{ {
int res = munmap(ptr,size); int res = munmap(ptr,size);
if (res == -1) if (res == (int)MAP_FAILED)
{ {
perror("libdha: unmapping memory failed"); perror("libdha: unmapping memory failed");
return -1; return;
} }
close(mem_fd); close(mem_fd);