Skip to content

Commit

Permalink
cast 2 signed/unsigned char pointer conversions to prevent warnings
Browse files Browse the repository at this point in the history
(errors on some compilers)
  • Loading branch information
Tony Cook committed Jul 18, 2006
1 parent 8a41a62 commit c0f79ae
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion image.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
5 changes: 3 additions & 2 deletions jpeg.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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);
}

Expand Down

0 comments on commit c0f79ae

Please sign in to comment.