summaryrefslogtreecommitdiff
blob: ec8e1891542421ab41eb2fe61c01a2b435962734 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
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<NumDirEntries;de++){
             int Tag;
             char * DirEntry;
-            DirEntry = DIR_ENTRY_ADDR(DirWithThumbnailPtrs, de);
+            DirEntry = (char *)DIR_ENTRY_ADDR(DirWithThumbnailPtrs, de);
             Tag = Get16u(DirEntry);
             if (Tag == TAG_THUMBNAIL_OFFSET || Tag == TAG_THUMBNAIL_LENGTH){
                 // We remove data out of the exif directory by doing a memmove on the rest
diff --exclude='*~' -Naur jhead-2.4.orig/gpsinfo.c jhead-2.4/gpsinfo.c
--- jhead-2.4.orig/gpsinfo.c	2005-09-10 15:38:49.000000000 -0300
+++ jhead-2.4/gpsinfo.c	2005-09-10 15:48:24.000000000 -0300
@@ -84,7 +84,7 @@
         int ComponentSize;
         unsigned ByteCount;
         char * DirEntry;
-        DirEntry = DIR_ENTRY_ADDR(DirStart, de);
+        DirEntry = (char *)DIR_ENTRY_ADDR(DirStart, de);
 
         Tag = Get16u(DirEntry);
         Format = Get16u(DirEntry+2);
@@ -111,7 +111,7 @@
             ValuePtr = OffsetBase+OffsetVal;
         }else{
             // 4 bytes or less and value is in the dir entry itself
-            ValuePtr = DirEntry+8;
+            ValuePtr = (uchar *)DirEntry+8;
         }
 
         switch(Tag){
diff --exclude='*~' -Naur jhead-2.4.orig/jpgfile.c jhead-2.4/jpgfile.c
--- jhead-2.4.orig/jpgfile.c	2005-09-10 15:38:49.000000000 -0300
+++ jhead-2.4/jpgfile.c	2005-09-10 15:41:41.000000000 -0300
@@ -245,7 +245,7 @@
                 // that uses marker 31 for non exif stuff.  Thus make sure 
                 // it says 'Exif' in the section before treating it as exif.
                 if ((ReadMode & READ_EXIF) && memcmp(Data+2, "Exif", 4) == 0){
-                    process_EXIF((char *)Data, itemlen);
+                    process_EXIF(Data, itemlen);
                 }else{
                     // Discard this section.
                     free(Sections[--SectionsRead].Data);
diff --exclude='*~' -Naur jhead-2.4.orig/makernote.c jhead-2.4/makernote.c
--- jhead-2.4.orig/makernote.c	2005-09-10 15:38:49.000000000 -0300
+++ jhead-2.4/makernote.c	2005-09-10 15:49:28.000000000 -0300
@@ -48,7 +48,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);
@@ -74,7 +74,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 (ShowTags){