[FFmpeg-devel] [PATCH] avutil/crc: add av_warn_unused_result to av_crc_init

2015-10-15 Thread Ganesh Ajjanagadde
This triggers useful warnings in avcodec/mlp that need to be fixed.

Signed-off-by: Ganesh Ajjanagadde 
---
 libavutil/crc.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libavutil/crc.h b/libavutil/crc.h
index e86bf1d..75929b2 100644
--- a/libavutil/crc.h
+++ b/libavutil/crc.h
@@ -60,6 +60,7 @@ typedef enum {
  * @param ctx_size size of ctx in bytes
  * @return <0 on failure
  */
+av_warn_unused_result
 int av_crc_init(AVCRC *ctx, int le, int bits, uint32_t poly, int ctx_size);
 
 /**
-- 
2.6.1

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


Re: [FFmpeg-devel] [PATCH] avutil/crc: add av_warn_unused_result to av_crc_init

2015-10-15 Thread Ganesh Ajjanagadde
On Thu, Oct 15, 2015 at 9:24 PM, Michael Niedermayer
 wrote:
> On Thu, Oct 15, 2015 at 07:32:45PM -0400, Ganesh Ajjanagadde wrote:
>> This triggers useful warnings in avcodec/mlp that need to be fixed.
>>
>> Signed-off-by: Ganesh Ajjanagadde 
>> ---
>>  libavutil/crc.h | 1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/libavutil/crc.h b/libavutil/crc.h
>> index e86bf1d..75929b2 100644
>> --- a/libavutil/crc.h
>> +++ b/libavutil/crc.h
>> @@ -60,6 +60,7 @@ typedef enum {
>>   * @param ctx_size size of ctx in bytes
>>   * @return <0 on failure
>>   */
>> +av_warn_unused_result
>>  int av_crc_init(AVCRC *ctx, int le, int bits, uint32_t poly, int ctx_size);
>
> this can only fail currently due to invalid/unsupported arguments
> being used
> a user application which uses only known to be good arguments
> does not need to check the return value

Yes, I forgot to add this to the "controversial list" - which contains
all the crypto stuff as well. Consider it dropped. Apologies.

>
>
> [...]
> --
> Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
>
> Many things microsoft did are stupid, but not doing something just because
> microsoft did it is even more stupid. If everything ms did were stupid they
> would be bankrupt already.
>
> ___
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] avutil/crc: add av_warn_unused_result to av_crc_init

2015-10-15 Thread Michael Niedermayer
On Thu, Oct 15, 2015 at 07:32:45PM -0400, Ganesh Ajjanagadde wrote:
> This triggers useful warnings in avcodec/mlp that need to be fixed.
> 
> Signed-off-by: Ganesh Ajjanagadde 
> ---
>  libavutil/crc.h | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/libavutil/crc.h b/libavutil/crc.h
> index e86bf1d..75929b2 100644
> --- a/libavutil/crc.h
> +++ b/libavutil/crc.h
> @@ -60,6 +60,7 @@ typedef enum {
>   * @param ctx_size size of ctx in bytes
>   * @return <0 on failure
>   */
> +av_warn_unused_result
>  int av_crc_init(AVCRC *ctx, int le, int bits, uint32_t poly, int ctx_size);

this can only fail currently due to invalid/unsupported arguments
being used
a user application which uses only known to be good arguments
does not need to check the return value


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

Many things microsoft did are stupid, but not doing something just because
microsoft did it is even more stupid. If everything ms did were stupid they
would be bankrupt already.


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