]> git.imager.perl.org - imager.git/commitdiff
cast 2 signed/unsigned char pointer conversions to prevent warnings
authorTony Cook <tony@develop=help.com>
Tue, 18 Jul 2006 13:21:21 +0000 (13:21 +0000)
committerTony Cook <tony@develop=help.com>
Tue, 18 Jul 2006 13:21:21 +0000 (13:21 +0000)
(errors on some compilers)

image.c
jpeg.c

diff --git a/image.c b/image.c
index a96a383abdf81525c1074b62064e80bbd4b2ad6b..41a86724614bbc73d25624cc82d97d4bbc2411e8 100644 (file)
--- a/image.c
+++ b/image.c
@@ -2152,7 +2152,7 @@ Check the beginning of the supplied file for a 'magic number'
 #define FORMAT_ENTRY(magic, type) \
   { (unsigned char *)(magic ""), sizeof(magic)-1, type }
 #define FORMAT_ENTRY2(magic, type, mask) \
-  { (unsigned char *)(magic ""), sizeof(magic)-1, type, mask }
+  { (unsigned char *)(magic ""), sizeof(magic)-1, type, (unsigned char *)(mask) }
 
 const char *
 i_test_format_probe(io_glue *data, int length) {
diff --git a/jpeg.c b/jpeg.c
index ab32e3df2c674e3cdeeff584d5780c9332cc8689..1215fa0c08e357972e120ac907dc792452c80eca 100644 (file)
--- a/jpeg.c
+++ b/jpeg.c
@@ -489,7 +489,7 @@ i_readjpeg_wiol(io_glue *data, int length, char** iptc_itext, int *itlength) {
   markerp = cinfo.marker_list;
   while (markerp != NULL) {
     if (markerp->marker == JPEG_COM) {
-      i_tags_add(&im->tags, "jpeg_comment", 0, markerp->data,
+      i_tags_add(&im->tags, "jpeg_comment", 0, (const char *)markerp->data,
                 markerp->data_length, 0);
     }
 #ifdef IMEXIF_ENABLE
@@ -630,7 +630,8 @@ i_writejpeg_wiol(i_img *im, io_glue *ig, int qfactor) {
   jpeg_start_compress(&cinfo, TRUE);
 
   if (i_tags_find(&im->tags, "jpeg_comment", 0, &comment_entry)) {
-    jpeg_write_marker(&cinfo, JPEG_COM, im->tags.tags[comment_entry].data,
+    jpeg_write_marker(&cinfo, JPEG_COM, 
+                      (const JOCTET *)im->tags.tags[comment_entry].data,
                      im->tags.tags[comment_entry].size);
   }