summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUoti Urpala <uau@mplayer2.org>2011-09-04 08:04:31 +0300
committerUoti Urpala <uau@mplayer2.org>2011-09-04 08:04:31 +0300
commit79469244f72d4350b630b21eac034a81b7b24cba (patch)
treebaecef33eacc73c0de1ac027ebb5fc9f9326a119
parent83fc5b60046b12227540f77969b5c1aa29107bad (diff)
downloadmpv-79469244f72d4350b630b21eac034a81b7b24cba.tar.bz2
mpv-79469244f72d4350b630b21eac034a81b7b24cba.tar.xz
input/ar.c, input/lirc.c: fix changes missing from 1916b95b8
1916b95b8 changed two function types from returning "void" to returning "int", but was missing changes to add "return 0;" to the functions. Fix. The reason for the change in the original commit was that the functions were called through a function pointer returning int anyway, so the missing return probably made things no more likely to fail at runtime than they were before that commit. However, it caused a compilation failure with clang, which treats non-void function not returning a value as a fatal error (in GCC it's just a warning).
-rw-r--r--input/ar.c3
-rw-r--r--input/lirc.c1
2 files changed, 3 insertions, 1 deletions
diff --git a/input/ar.c b/input/ar.c
index f8a3f0ad44..7b7cc8e3db 100644
--- a/input/ar.c
+++ b/input/ar.c
@@ -415,7 +415,7 @@ int mp_input_ar_read(void *ctx, int fd)
int mp_input_ar_close(int fd)
{
if (initialized == 0)
- return;
+ return 0;
// Close the device.
(*hidDeviceInterface)->close(hidDeviceInterface);
@@ -431,6 +431,7 @@ int mp_input_ar_close(int fd)
(*hidDeviceInterface)->Release(hidDeviceInterface);
initialized = 0;
+ return 0;
}
#ifdef TEST
diff --git a/input/lirc.c b/input/lirc.c
index 80744e606a..490abe2cb1 100644
--- a/input/lirc.c
+++ b/input/lirc.c
@@ -119,4 +119,5 @@ int mp_input_lirc_close(int fd)
cmd_buf = NULL;
lirc_freeconfig(lirc_config);
lirc_deinit();
+ return 0;
}