[FFmpeg-devel] [PATCH][RFC] avutil/time: add av_warn_unused_result to av_usleep
Hendrik Leppkes
h.leppkes at gmail.com
Fri Oct 16 00:01:28 CEST 2015
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.
More information about the ffmpeg-devel
mailing list