diff mbox series

[FFmpeg-devel,v2] fftools/objpool: Don't use return with expression when returning void

Message ID DB6PR0101MB2214A88BD451AA0BBE27EA148F939@DB6PR0101MB2214.eurprd01.prod.exchangelabs.com
State Accepted
Commit 8136ab8e768b3341929f98412071d492fa729a06
Headers show
Series [FFmpeg-devel,v2] fftools/objpool: Don't use return with expression when returning void | expand


Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Andreas Rheinhardt July 23, 2022, 5 p.m. UTC
Using tail calls with functions returning void is forbidden
(C99/C11 "A return statement with an expression shall not appear
in a function whose return type is void.") GCC emits a warning
because of this when using -pedantic: "ISO C forbids ‘return’ with
expression, in function returning void"

Reviewed-by: Hendrik Leppkes <h.leppkes@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Will apply this soon unless someone objects.

 fftools/objpool.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series


diff --git a/fftools/objpool.c b/fftools/objpool.c
index b1561ecd69..87237cf724 100644
--- a/fftools/objpool.c
+++ b/fftools/objpool.c
@@ -101,11 +101,11 @@  static void *alloc_frame(void)
 static void reset_packet(void *obj)
-    return av_packet_unref(obj);
+    av_packet_unref(obj);
 static void reset_frame(void *obj)
-    return av_frame_unref(obj);
+    av_frame_unref(obj);
 static void free_packet(void **obj)