[libbluray-devel] ecma167: fix conversion warnings

Petri Hintukainen git at videolan.org
Mon Jun 20 17:14:54 CEST 2016


libudfread | branch: master | Petri Hintukainen <phintuka at gmail.com> | Sat Jun 18 15:12:35 2016 +0300| [3dd2f2ecd870757af5d27282412f496ab9413615] | committer: Petri Hintukainen

ecma167: fix conversion warnings

> http://git.videolan.org/gitweb.cgi/libudfread.git/?a=commit;h=3dd2f2ecd870757af5d27282412f496ab9413615
---

 src/ecma167.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/ecma167.c b/src/ecma167.c
index 1bbf2fd..ff4d791 100644
--- a/src/ecma167.c
+++ b/src/ecma167.c
@@ -155,7 +155,7 @@ void decode_file_set_descriptor(const uint8_t *p, struct file_set_descriptor *fs
 /* File Identifier (ECMA 167 4/14.4) */
 size_t decode_file_identifier(const uint8_t *p, struct file_identifier *fi)
 {
-    uint16_t       l_iu; /* length of implementation use field */
+    size_t l_iu; /* length of implementation use field */
 
     fi->characteristic = _get_u8(p + 18);
     fi->filename_len   = _get_u8(p + 19);
@@ -172,7 +172,7 @@ size_t decode_file_identifier(const uint8_t *p, struct file_identifier *fi)
      * padding size 4 * ip((L_FI+L_IU+38+3)/4) - (L_FI+L_IU+38)
      * => padded to dwords
      */
-    return 4 * ((38 + fi->filename_len + l_iu + 3) / 4);
+    return 4 * ((38 + (size_t)fi->filename_len + l_iu + 3) / 4);
 }
 
 /* ICB Tag (ECMA 167 4/14.6) */
@@ -244,7 +244,7 @@ static struct file_entry *_decode_file_entry(const uint8_t *p, size_t size,
 {
     struct file_entry *fe;
     struct icb_tag     tag;
-    int                num_ad;
+    uint32_t           num_ad;
     int                content_inline = 0;
 
     if (p_ad + l_ad > size) {



More information about the libbluray-devel mailing list