[libbluray-devel] cast file read/write result to size_t

Joakim Plate elupus at xbmc.org
Fri Apr 12 00:26:18 CEST 2013


This will break error checking. They can return negative. You could do
ssize_t perhaps.

On Thu, Apr 11, 2013 at 11:30 PM, Ian Curtis <git at videolan.org> wrote:

> libbluray | branch: master | Ian Curtis <i.curtis at gmail.com> | Fri Apr 12
> 00:24:29 2013 +0300| [a8b18b411f25ff55f40cc6cb2517efada2a6a9d3] |
> committer: hpi1
>
> cast file read/write result to size_t
>
> >
> http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=a8b18b411f25ff55f40cc6cb2517efada2a6a9d3
> ---
>
>  src/file/file.h |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/src/file/file.h b/src/file/file.h
> index cad5d54..080485b 100644
> --- a/src/file/file.h
> +++ b/src/file/file.h
> @@ -39,8 +39,8 @@
>  #define file_seek(X,Y,Z) X->seek(X,Y,Z)
>  #define file_tell(X) X->tell(X)
>  #define file_eof(X) X->eof(X)
> -#define file_read(X,Y,Z) X->read(X,Y,Z)
> -#define file_write(X,Y,Z) X->write(X,Y,Z)
> +#define file_read(X,Y,Z) (size_t)X->read(X,Y,Z)
> +#define file_write(X,Y,Z) (size_t)X->write(X,Y,Z)
>
>  BD_PRIVATE extern BD_FILE_H* (*file_open)(const char* filename, const
> char *mode);
>
>
> _______________________________________________
> libbluray-devel mailing list
> libbluray-devel at videolan.org
> http://mailman.videolan.org/listinfo/libbluray-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/libbluray-devel/attachments/20130412/9b860cea/attachment.html>


More information about the libbluray-devel mailing list