avutil/opencl_internal: add av_warn_unused_result
authorGanesh Ajjanagadde <gajjanagadde@gmail.com>
Sat, 31 Oct 2015 14:36:22 +0000 (10:36 -0400)
committerGanesh Ajjanagadde <gajjanagadde@gmail.com>
Sat, 31 Oct 2015 14:40:54 +0000 (10:40 -0400)
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@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
libavutil/opencl_internal.h

index dacd930..ddc6d3a 100644 (file)
@@ -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, ...);