[FFmpeg-cvslog] avutil/opencl_internal: add av_warn_unused_result

Ganesh Ajjanagadde git at videolan.org
Sat Oct 31 15:43:24 CET 2015


ffmpeg | branch: master | Ganesh Ajjanagadde <gajjanagadde at gmail.com> | Sat Oct 31 10:36:22 2015 -0400| [8a5b60a6b1d841b74c2670f5165c8b05321f395a] | committer: Ganesh Ajjanagadde

avutil/opencl_internal: add av_warn_unused_result

clSetKernelArg can return an error due to lack of memory (for instance):
https://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clSetKernelArg.html.
Thus this error must be propagated.

Currently should not trigger warnings, but adds robustness.
Untested.

Reviewed-by: Michael Niedermayer <michael at niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8a5b60a6b1d841b74c2670f5165c8b05321f395a
---

 libavutil/opencl_internal.h |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavutil/opencl_internal.h b/libavutil/opencl_internal.h
index dacd930..ddc6d3a 100644
--- a/libavutil/opencl_internal.h
+++ b/libavutil/opencl_internal.h
@@ -20,6 +20,7 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
+#include "attributes.h"
 #include "opencl.h"
 
 #define FF_OPENCL_PARAM_INFO(a) ((void*)(&(a))), (sizeof(a))
@@ -30,4 +31,5 @@ typedef struct {
     void *ctx;
 } FFOpenclParam;
 
+av_warn_unused_result
 int avpriv_opencl_set_parameter(FFOpenclParam *opencl_param, ...);



More information about the ffmpeg-cvslog mailing list