summaryrefslogtreecommitdiff
path: root/apps/codecs/libwavpack/metadata.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/codecs/libwavpack/metadata.c')
-rw-r--r--apps/codecs/libwavpack/metadata.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/apps/codecs/libwavpack/metadata.c b/apps/codecs/libwavpack/metadata.c
index ebc7dcf99d..b7d1e950bf 100644
--- a/apps/codecs/libwavpack/metadata.c
+++ b/apps/codecs/libwavpack/metadata.c
@@ -29,12 +29,12 @@ int read_metadata_buff (WavpackContext *wpc, WavpackMetadata *wpmd)
29 if (!wpc->infile (&tchar, 1)) 29 if (!wpc->infile (&tchar, 1))
30 return FALSE; 30 return FALSE;
31 31
32 wpmd->byte_length += (long) tchar << 9; 32 wpmd->byte_length += (int32_t) tchar << 9;
33 33
34 if (!wpc->infile (&tchar, 1)) 34 if (!wpc->infile (&tchar, 1))
35 return FALSE; 35 return FALSE;
36 36
37 wpmd->byte_length += (long) tchar << 17; 37 wpmd->byte_length += (int32_t) tchar << 17;
38 } 38 }
39 39
40 if (wpmd->id & ID_ODD_SIZE) { 40 if (wpmd->id & ID_ODD_SIZE) {
@@ -42,10 +42,10 @@ int read_metadata_buff (WavpackContext *wpc, WavpackMetadata *wpmd)
42 wpmd->byte_length--; 42 wpmd->byte_length--;
43 } 43 }
44 44
45 if (wpmd->byte_length && wpmd->byte_length <= (long)sizeof (wpc->read_buffer)) { 45 if (wpmd->byte_length && wpmd->byte_length <= (int32_t)sizeof (wpc->read_buffer)) {
46 ulong bytes_to_read = wpmd->byte_length + (wpmd->byte_length & 1); 46 uint32_t bytes_to_read = wpmd->byte_length + (wpmd->byte_length & 1);
47 47
48 if (wpc->infile (wpc->read_buffer, bytes_to_read) != (long) bytes_to_read) { 48 if (wpc->infile (wpc->read_buffer, bytes_to_read) != (int32_t) bytes_to_read) {
49 wpmd->data = NULL; 49 wpmd->data = NULL;
50 return FALSE; 50 return FALSE;
51 } 51 }
@@ -108,7 +108,7 @@ int process_metadata (WavpackContext *wpc, WavpackMetadata *wpmd)
108 108
109int copy_metadata (WavpackMetadata *wpmd, uchar *buffer_start, uchar *buffer_end) 109int copy_metadata (WavpackMetadata *wpmd, uchar *buffer_start, uchar *buffer_end)
110{ 110{
111 ulong mdsize = wpmd->byte_length + (wpmd->byte_length & 1); 111 uint32_t mdsize = wpmd->byte_length + (wpmd->byte_length & 1);
112 WavpackHeader *wphdr = (WavpackHeader *) buffer_start; 112 WavpackHeader *wphdr = (WavpackHeader *) buffer_start;
113 113
114 if (wpmd->byte_length & 1) 114 if (wpmd->byte_length & 1)