diff --exclude='*~' -Naur jhead-2.4.orig/exif.c jhead-2.4/exif.c --- jhead-2.4.orig/exif.c 2005-09-10 15:38:49.000000000 -0300 +++ jhead-2.4/exif.c 2005-09-10 15:51:45.000000000 -0300 @@ -395,7 +395,7 @@ unsigned char * ValuePtr; int ByteCount; char * DirEntry; - DirEntry = DIR_ENTRY_ADDR(DirStart, de); + DirEntry = (char *)DIR_ENTRY_ADDR(DirStart, de); Tag = Get16u(DirEntry); Format = Get16u(DirEntry+2); @@ -421,7 +421,7 @@ ValuePtr = OffsetBase+OffsetVal; }else{ // 4 bytes or less and value is in the dir entry itself - ValuePtr = DirEntry+8; + ValuePtr = (uchar *)DirEntry+8; } if (LastExifRefd < ValuePtr+ByteCount){ @@ -493,17 +493,17 @@ switch(Tag){ case TAG_MAKE: - strncpy(ImageInfo.CameraMake, ValuePtr, 31); + strncpy(ImageInfo.CameraMake, (char *)ValuePtr, 31); break; case TAG_MODEL: - strncpy(ImageInfo.CameraModel, ValuePtr, 39); + strncpy(ImageInfo.CameraModel, (char *)ValuePtr, 39); break; case TAG_DATETIME_ORIGINAL: // If we get a DATETIME_ORIGINAL, we use that one. - strncpy(ImageInfo.DateTime, ValuePtr, 19); + strncpy(ImageInfo.DateTime, (char *)ValuePtr, 19); // Fallthru... case TAG_DATETIME_DIGITIZED: @@ -511,14 +511,14 @@ if (!isdigit(ImageInfo.DateTime[0])){ // If we don't already have a DATETIME_ORIGINAL, use whatever // time fields we may have. - strncpy(ImageInfo.DateTime, ValuePtr, 19); + strncpy(ImageInfo.DateTime, (char *)ValuePtr, 19); } if (ImageInfo.numDateTimeTags >= MAX_DATE_COPIES){ ErrNonfatal("More than %d date fields! This is nuts", MAX_DATE_COPIES, 0); break; } - ImageInfo.DateTimePointers[ImageInfo.numDateTimeTags++] = ValuePtr; + ImageInfo.DateTimePointers[ImageInfo.numDateTimeTags++] = (char *)ValuePtr; break; @@ -540,13 +540,13 @@ int c; c = (ValuePtr)[a]; if (c != '\0' && c != ' '){ - strncpy(ImageInfo.Comments, a+ValuePtr, 199); + strncpy(ImageInfo.Comments, (char *)(a+ValuePtr), 199); break; } } }else{ - strncpy(ImageInfo.Comments, ValuePtr, 199); + strncpy(ImageInfo.Comments, (char *)ValuePtr, 199); } break; @@ -927,7 +927,7 @@ for (de=0;de