summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoralex <alex@b3059339-0415-0410-9bf9-f77b7e298cf2>2003-02-02 12:27:35 +0000
committeralex <alex@b3059339-0415-0410-9bf9-f77b7e298cf2>2003-02-02 12:27:35 +0000
commit10e2457f2ed1faf6e4818bb1f017aa4d4b01f4e9 (patch)
tree43b53fd771a4d83c406f0303d160cb31047d9377
parente3f98b9dda16a3c95712cc8a46d3a831085fce49 (diff)
downloadmpv-10e2457f2ed1faf6e4818bb1f017aa4d4b01f4e9.tar.bz2
mpv-10e2457f2ed1faf6e4818bb1f017aa4d4b01f4e9.tar.xz
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
-rw-r--r--libdha/libdha.c10
1 files changed, 6 insertions, 4 deletions
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);