From 10e2457f2ed1faf6e4818bb1f017aa4d4b01f4e9 Mon Sep 17 00:00:00 2001 From: alex Date: Sun, 2 Feb 2003 12:27:35 +0000 Subject: 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 --- libdha/libdha.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'libdha') diff --git a/libdha/libdha.c b/libdha/libdha.c index 6d32f68d02..8771147017 100644 --- a/libdha/libdha.c +++ b/libdha/libdha.c @@ -88,7 +88,9 @@ void *map_phys_mem(unsigned long base, unsigned long size) #endif #ifdef CONFIG_DHAHELPER +#ifdef CONFIG_SVGAHELPER dha_helper_way: +#endif if ( (mem_fd = open("/dev/dhahelper",O_RDWR)) < 0) { perror("libdha: DHA kernelhelper failed"); @@ -118,22 +120,22 @@ dev_mem_way: if ( (mem_fd = open(DEV_MEM,O_RDWR)) == -1) { perror("libdha: opening /dev/mem failed"); - return -1; + return MAP_FAILED; } mmap: 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) { int res = munmap(ptr,size); - if (res == -1) + if (res == (int)MAP_FAILED) { perror("libdha: unmapping memory failed"); - return -1; + return; } close(mem_fd); -- cgit v1.2.3