aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2012-06-03 22:31:16 +0000
committerChristian Grothoff <christian@grothoff.org>2012-06-03 22:31:16 +0000
commit252f633f7cbfe2b73ec9c5e8921c9086884868c9 (patch)
treeead24bb9f33fc5064ed7f5f1987ecb90d72e1150
parentd860227153a0e8fad5a879763c4952b9ceb15333 (diff)
downloadlibextractor-252f633f7cbfe2b73ec9c5e8921c9086884868c9.tar.gz
libextractor-252f633f7cbfe2b73ec9c5e8921c9086884868c9.zip
-fixing misc. compiler warnings
-rw-r--r--src/main/extractor.c18
-rw-r--r--src/plugins/id3v2_extractor.c2
2 files changed, 5 insertions, 15 deletions
diff --git a/src/main/extractor.c b/src/main/extractor.c
index bfee6d5..a18e8b6 100644
--- a/src/main/extractor.c
+++ b/src/main/extractor.c
@@ -366,7 +366,6 @@ process_requests (struct EXTRACTOR_PluginList *plugin)
366 int in, out; 366 int in, out;
367 int read_result1, read_result2, read_result3, read_result4; 367 int read_result1, read_result2, read_result3, read_result4;
368 unsigned char code; 368 unsigned char code;
369 void *shm_ptr = NULL;
370 char *shm_name = NULL; 369 char *shm_name = NULL;
371 size_t shm_name_len; 370 size_t shm_name_len;
372 371
@@ -1658,7 +1657,7 @@ bfds_read (struct BufferedFileDataSource *bfds, unsigned char **buf_ptr, int64_t
1658 else 1657 else
1659 { 1658 {
1660 int64_t ret = count < (bfds->buffer_bytes - bfds->buffer_pos) ? count : (bfds->buffer_bytes - bfds->buffer_pos); 1659 int64_t ret = count < (bfds->buffer_bytes - bfds->buffer_pos) ? count : (bfds->buffer_bytes - bfds->buffer_pos);
1661 *buf_ptr = &bfds->data[bfds->buffer_pos]; 1660 *buf_ptr = (unsigned char*) &bfds->data[bfds->buffer_pos];
1662 bfds->buffer_pos += ret; 1661 bfds->buffer_pos += ret;
1663 return ret; 1662 return ret;
1664 } 1663 }
@@ -1668,7 +1667,7 @@ bfds_read (struct BufferedFileDataSource *bfds, unsigned char **buf_ptr, int64_t
1668 if (bfds->data == NULL) 1667 if (bfds->data == NULL)
1669 *buf_ptr = &bfds->buffer[bfds->buffer_pos]; 1668 *buf_ptr = &bfds->buffer[bfds->buffer_pos];
1670 else 1669 else
1671 *buf_ptr = &bfds->data[bfds->buffer_pos]; 1670 *buf_ptr = (unsigned char*) &bfds->data[bfds->buffer_pos];
1672 bfds->buffer_pos += count; 1671 bfds->buffer_pos += count;
1673 return count; 1672 return count;
1674 } 1673 }
@@ -1784,7 +1783,7 @@ struct CompressedFileSource
1784#endif 1783#endif
1785}; 1784};
1786 1785
1787int 1786void
1788cfs_delete (struct CompressedFileSource *cfs) 1787cfs_delete (struct CompressedFileSource *cfs)
1789{ 1788{
1790#if WINDOWS 1789#if WINDOWS
@@ -1829,12 +1828,10 @@ cfs_reset_stream_zlib (struct CompressedFileSource *cfs)
1829 cfs->shm_pos = 0; 1828 cfs->shm_pos = 0;
1830 cfs->shm_buf_size = 0; 1829 cfs->shm_buf_size = 0;
1831 1830
1832#if HAVE_ZLIB
1833 z_stream strm;
1834#endif
1835 return 1; 1831 return 1;
1836} 1832}
1837 1833
1834
1838static int 1835static int
1839cfs_reset_stream_bz2 (struct CompressedFileSource *cfs) 1836cfs_reset_stream_bz2 (struct CompressedFileSource *cfs)
1840{ 1837{
@@ -1882,7 +1879,6 @@ cfs_init_decompressor_zlib (struct CompressedFileSource *cfs, EXTRACTOR_MetaData
1882 1879
1883 if (data[3] & 0x8) /* FNAME set */ 1880 if (data[3] & 0x8) /* FNAME set */
1884 { 1881 {
1885 int64_t fp = cfs->fpos;
1886 int64_t buf_bytes; 1882 int64_t buf_bytes;
1887 int len; 1883 int len;
1888 unsigned char *buf, *cptr; 1884 unsigned char *buf, *cptr;
@@ -1916,7 +1912,6 @@ cfs_init_decompressor_zlib (struct CompressedFileSource *cfs, EXTRACTOR_MetaData
1916 1912
1917 if (data[3] & 0x16) /* FCOMMENT set */ 1913 if (data[3] & 0x16) /* FCOMMENT set */
1918 { 1914 {
1919 int64_t fp = cfs->fpos;
1920 int64_t buf_bytes; 1915 int64_t buf_bytes;
1921 int len; 1916 int len;
1922 unsigned char *buf, *cptr; 1917 unsigned char *buf, *cptr;
@@ -2037,7 +2032,6 @@ struct CompressedFileSource *
2037cfs_new (struct BufferedFileDataSource *bfds, int64_t fsize, enum ExtractorCompressionType compression_type, EXTRACTOR_MetaDataProcessor proc, void *proc_cls) 2032cfs_new (struct BufferedFileDataSource *bfds, int64_t fsize, enum ExtractorCompressionType compression_type, EXTRACTOR_MetaDataProcessor proc, void *proc_cls)
2038{ 2033{
2039 int shm_result; 2034 int shm_result;
2040 size_t map_size;
2041 struct CompressedFileSource *cfs; 2035 struct CompressedFileSource *cfs;
2042 cfs = malloc (sizeof (struct CompressedFileSource)); 2036 cfs = malloc (sizeof (struct CompressedFileSource));
2043 if (cfs == NULL) 2037 if (cfs == NULL)
@@ -2488,6 +2482,7 @@ pl_pick_next_buffer_at (struct EXTRACTOR_PluginList *plugin, int64_t pos, uint8_
2488 } 2482 }
2489 return 0; 2483 return 0;
2490 } 2484 }
2485 return -1;
2491} 2486}
2492 2487
2493/** 2488/**
@@ -3273,9 +3268,6 @@ EXTRACTOR_extract (struct EXTRACTOR_PluginList *plugins,
3273 struct stat64 fstatbuf; 3268 struct stat64 fstatbuf;
3274 int64_t fsize = 0; 3269 int64_t fsize = 0;
3275 enum ExtractorCompressionType compression_type = -1; 3270 enum ExtractorCompressionType compression_type = -1;
3276 void *buffer = NULL;
3277 size_t buffer_size;
3278 int decompression_result;
3279 struct CompressedFileSource *cfs = NULL; 3271 struct CompressedFileSource *cfs = NULL;
3280 3272
3281 /* If data is not given, then we need to read it from the file. Try opening it */ 3273 /* If data is not given, then we need to read it from the file. Try opening it */
diff --git a/src/plugins/id3v2_extractor.c b/src/plugins/id3v2_extractor.c
index 6d65bca..3b05755 100644
--- a/src/plugins/id3v2_extractor.c
+++ b/src/plugins/id3v2_extractor.c
@@ -255,8 +255,6 @@ int
255EXTRACTOR_id3v2_extract_method (struct EXTRACTOR_PluginList *plugin, 255EXTRACTOR_id3v2_extract_method (struct EXTRACTOR_PluginList *plugin,
256 EXTRACTOR_MetaDataProcessor proc, void *proc_cls) 256 EXTRACTOR_MetaDataProcessor proc, void *proc_cls)
257{ 257{
258 int64_t file_position;
259 int64_t file_size;
260 int64_t offset = 0; 258 int64_t offset = 0;
261 int64_t size; 259 int64_t size;
262 struct id3v2_state *state; 260 struct id3v2_state *state;