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

Ganesh Ajjanagadde gajjanag at mit.edu
Fri Oct 16 03:33:52 CEST 2015


On Thu, Oct 15, 2015 at 9:24 PM, Michael Niedermayer
<michael at niedermayer.cc> 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 <gajjanagadde at gmail.com>
>> ---
>>  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 at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>


More information about the ffmpeg-devel mailing list