[FFmpeg-devel] [PATCH][RFC] avutil/time: add av_warn_unused_result to av_usleep

Ganesh Ajjanagadde gajjanag at mit.edu
Fri Oct 16 00:06:18 CEST 2015


On Thu, Oct 15, 2015 at 6:01 PM, Hendrik Leppkes <h.leppkes at gmail.com> wrote:
> On Thu, Oct 15, 2015 at 11:59 PM, Ganesh Ajjanagadde
> <gajjanagadde at gmail.com> wrote:
>> av_usleep can fail. Forcing users to check the error code here may be
>> somewhat controversial.
>>
>> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde at gmail.com>
>> ---
>>  libavutil/time.h | 1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/libavutil/time.h b/libavutil/time.h
>> index dc169b0..f55167b 100644
>> --- a/libavutil/time.h
>> +++ b/libavutil/time.h
>> @@ -51,6 +51,7 @@ int av_gettime_relative_is_monotonic(void);
>>   * @param  usec Number of microseconds to sleep.
>>   * @return zero on success or (negative) error code.
>>   */
>> +av_warn_unused_result
>>  int av_usleep(unsigned usec);
>>
>>  #endif /* AVUTIL_TIME_H */
>> --
>> 2.6.1
>
> Checking if your sleep failed is kinda silly. What do you want to do, try again?
> Its just a sleep afterall.

Yes, this was why I marked this as an RFC. Patch dropped. Thanks.

> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


More information about the ffmpeg-devel mailing list