Re: [FFmpeg-devel] [PATCHv2] avutil/buffer: add av_warn_unused_result

2015-10-30 Thread Michael Niedermayer
On Thu, Oct 15, 2015 at 07:10:47PM -0400, Ganesh Ajjanagadde wrote:
> Signed-off-by: Ganesh Ajjanagadde 
> ---
>  libavutil/buffer.h | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/libavutil/buffer.h b/libavutil/buffer.h
> index b4399fd..e0dbc8a 100644
> --- a/libavutil/buffer.h
> +++ b/libavutil/buffer.h
> @@ -26,6 +26,7 @@
>  #define AVUTIL_BUFFER_H
>  
>  #include 
> +#include "attributes.h"
>  
>  /**
>   * @defgroup lavu_buffer AVBuffer
> @@ -178,6 +179,7 @@ int av_buffer_get_ref_count(const AVBufferRef *buf);
>   *written in its place. On failure, buf is left untouched.
>   * @return 0 on success, a negative AVERROR on failure.
>   */
> +av_warn_unused_result
>  int av_buffer_make_writable(AVBufferRef **buf);

>  
>  /**
> @@ -195,6 +197,7 @@ int av_buffer_make_writable(AVBufferRef **buf);
>   * reference to it (i.e. the one passed to this function). In all other cases
>   * a new buffer is allocated and the data is copied.
>   */
> +av_warn_unused_result
>  int av_buffer_realloc(AVBufferRef **buf, int size);

libavutil/buffer.c in one case checks av_buffer_realloc()
for failure by checking the buf poiner after the call instead
of the return code. This use seems valid


[...]
-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

No great genius has ever existed without some touch of madness. -- Aristotle


signature.asc
Description: Digital signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCHv2] avutil/buffer: add av_warn_unused_result

2015-10-28 Thread Ganesh Ajjanagadde
On Thu, Oct 15, 2015 at 7:10 PM, Ganesh Ajjanagadde
 wrote:
> Signed-off-by: Ganesh Ajjanagadde 
> ---
>  libavutil/buffer.h | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/libavutil/buffer.h b/libavutil/buffer.h
> index b4399fd..e0dbc8a 100644
> --- a/libavutil/buffer.h
> +++ b/libavutil/buffer.h
> @@ -26,6 +26,7 @@
>  #define AVUTIL_BUFFER_H
>
>  #include 
> +#include "attributes.h"
>
>  /**
>   * @defgroup lavu_buffer AVBuffer
> @@ -178,6 +179,7 @@ int av_buffer_get_ref_count(const AVBufferRef *buf);
>   *written in its place. On failure, buf is left untouched.
>   * @return 0 on success, a negative AVERROR on failure.
>   */
> +av_warn_unused_result
>  int av_buffer_make_writable(AVBufferRef **buf);
>
>  /**
> @@ -195,6 +197,7 @@ int av_buffer_make_writable(AVBufferRef **buf);
>   * reference to it (i.e. the one passed to this function). In all other cases
>   * a new buffer is allocated and the data is copied.
>   */
> +av_warn_unused_result
>  int av_buffer_realloc(AVBufferRef **buf, int size);
>
>  /**
> --
> 2.6.1
>

ping
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCHv2] avutil/buffer: add av_warn_unused_result

2015-10-15 Thread Ganesh Ajjanagadde
Signed-off-by: Ganesh Ajjanagadde 
---
 libavutil/buffer.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/libavutil/buffer.h b/libavutil/buffer.h
index b4399fd..e0dbc8a 100644
--- a/libavutil/buffer.h
+++ b/libavutil/buffer.h
@@ -26,6 +26,7 @@
 #define AVUTIL_BUFFER_H
 
 #include 
+#include "attributes.h"
 
 /**
  * @defgroup lavu_buffer AVBuffer
@@ -178,6 +179,7 @@ int av_buffer_get_ref_count(const AVBufferRef *buf);
  *written in its place. On failure, buf is left untouched.
  * @return 0 on success, a negative AVERROR on failure.
  */
+av_warn_unused_result
 int av_buffer_make_writable(AVBufferRef **buf);
 
 /**
@@ -195,6 +197,7 @@ int av_buffer_make_writable(AVBufferRef **buf);
  * reference to it (i.e. the one passed to this function). In all other cases
  * a new buffer is allocated and the data is copied.
  */
+av_warn_unused_result
 int av_buffer_realloc(AVBufferRef **buf, int size);
 
 /**
-- 
2.6.1

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel