@@ -230,10 +230,10 @@ static size_t php_strnlen(char* str, size_t maxlen) {
230
230
/* }}} */
231
231
232
232
/* {{{ error messages */
233
- static const char * EXIF_ERROR_FILEEOF = "Unexpected end of file reached" ;
234
- static const char * EXIF_ERROR_CORRUPT = "File structure corrupted" ;
235
- static const char * EXIF_ERROR_THUMBEOF = "Thumbnail goes IFD boundary or end of file reached" ;
236
- static const char * EXIF_ERROR_FSREALLOC = "Illegal reallocating of undefined file section" ;
233
+ static const char * const EXIF_ERROR_FILEEOF = "Unexpected end of file reached" ;
234
+ static const char * const EXIF_ERROR_CORRUPT = "File structure corrupted" ;
235
+ static const char * const EXIF_ERROR_THUMBEOF = "Thumbnail goes IFD boundary or end of file reached" ;
236
+ static const char * const EXIF_ERROR_FSREALLOC = "Illegal reallocating of undefined file section" ;
237
237
238
238
#define EXIF_ERRLOG_FILEEOF (ImageInfo ) exif_error_docref(NULL EXIFERR_CC, ImageInfo, E_WARNING, "%s", EXIF_ERROR_FILEEOF);
239
239
#define EXIF_ERRLOG_CORRUPT (ImageInfo ) exif_error_docref(NULL EXIFERR_CC, ImageInfo, E_WARNING, "%s", EXIF_ERROR_CORRUPT);
@@ -244,7 +244,7 @@ static const char * EXIF_ERROR_FSREALLOC = "Illegal reallocating of undefined fi
244
244
/* {{{ format description defines
245
245
Describes format descriptor
246
246
*/
247
- static int php_tiff_bytes_per_format [] = {0 , 1 , 1 , 2 , 4 , 8 , 1 , 1 , 2 , 4 , 8 , 4 , 8 , 1 };
247
+ static const int php_tiff_bytes_per_format [] = {0 , 1 , 1 , 2 , 4 , 8 , 1 , 1 , 2 , 4 , 8 , 4 , 8 , 1 };
248
248
#define NUM_FORMATS 13
249
249
250
250
#define TAG_FMT_BYTE 1
@@ -504,15 +504,15 @@ typedef const struct {
504
504
char * Desc ;
505
505
} tag_info_type ;
506
506
507
- typedef tag_info_type tag_info_array [];
508
- typedef tag_info_type * tag_table_type ;
507
+ typedef const tag_info_type tag_info_array [];
508
+ typedef const tag_info_type * tag_table_type ;
509
509
510
510
#define TAG_TABLE_END \
511
511
{TAG_NONE, "No tag value"},\
512
512
{TAG_COMPUTED_VALUE, "Computed value"},\
513
513
{TAG_END_OF_LIST, ""} /* Important for exif_get_tagname() IF value != "" function result is != false */
514
514
515
- static tag_info_array tag_table_IFD = {
515
+ static const tag_info_array tag_table_IFD = {
516
516
{ 0x000B , "ACDComment" },
517
517
{ 0x00FE , "NewSubFile" }, /* better name it 'ImageType' ? */
518
518
{ 0x00FF , "SubFile" },
@@ -760,7 +760,7 @@ static tag_info_array tag_table_IFD = {
760
760
TAG_TABLE_END
761
761
} ;
762
762
763
- static tag_info_array tag_table_GPS = {
763
+ static const tag_info_array tag_table_GPS = {
764
764
{ 0x0000 , "GPSVersion" },
765
765
{ 0x0001 , "GPSLatitudeRef" },
766
766
{ 0x0002 , "GPSLatitude" },
@@ -795,7 +795,7 @@ static tag_info_array tag_table_GPS = {
795
795
TAG_TABLE_END
796
796
};
797
797
798
- static tag_info_array tag_table_IOP = {
798
+ static const tag_info_array tag_table_IOP = {
799
799
{ 0x0001 , "InterOperabilityIndex" }, /* should be 'R98' or 'THM' */
800
800
{ 0x0002 , "InterOperabilityVersion" },
801
801
{ 0x1000 , "RelatedFileFormat" },
@@ -804,7 +804,7 @@ static tag_info_array tag_table_IOP = {
804
804
TAG_TABLE_END
805
805
};
806
806
807
- static tag_info_array tag_table_VND_CANON = {
807
+ static const tag_info_array tag_table_VND_CANON = {
808
808
{ 0x0001 , "ModeArray" }, /* guess */
809
809
{ 0x0004 , "ImageInfo" }, /* guess */
810
810
{ 0x0006 , "ImageType" },
@@ -816,7 +816,7 @@ static tag_info_array tag_table_VND_CANON = {
816
816
TAG_TABLE_END
817
817
};
818
818
819
- static tag_info_array tag_table_VND_CASIO = {
819
+ static const tag_info_array tag_table_VND_CASIO = {
820
820
{ 0x0001 , "RecordingMode" },
821
821
{ 0x0002 , "Quality" },
822
822
{ 0x0003 , "FocusingMode" },
@@ -832,7 +832,7 @@ static tag_info_array tag_table_VND_CASIO = {
832
832
TAG_TABLE_END
833
833
};
834
834
835
- static tag_info_array tag_table_VND_FUJI = {
835
+ static const tag_info_array tag_table_VND_FUJI = {
836
836
{ 0x0000 , "Version" },
837
837
{ 0x1000 , "Quality" },
838
838
{ 0x1001 , "Sharpness" },
@@ -852,7 +852,7 @@ static tag_info_array tag_table_VND_FUJI = {
852
852
TAG_TABLE_END
853
853
};
854
854
855
- static tag_info_array tag_table_VND_NIKON = {
855
+ static const tag_info_array tag_table_VND_NIKON = {
856
856
{ 0x0003 , "Quality" },
857
857
{ 0x0004 , "ColorMode" },
858
858
{ 0x0005 , "ImageAdjustment" },
@@ -864,7 +864,7 @@ static tag_info_array tag_table_VND_NIKON = {
864
864
TAG_TABLE_END
865
865
};
866
866
867
- static tag_info_array tag_table_VND_NIKON_990 = {
867
+ static const tag_info_array tag_table_VND_NIKON_990 = {
868
868
{ 0x0001 , "Version" },
869
869
{ 0x0002 , "ISOSetting" },
870
870
{ 0x0003 , "ColorMode" },
@@ -883,7 +883,7 @@ static tag_info_array tag_table_VND_NIKON_990 = {
883
883
TAG_TABLE_END
884
884
};
885
885
886
- static tag_info_array tag_table_VND_OLYMPUS = {
886
+ static const tag_info_array tag_table_VND_OLYMPUS = {
887
887
{ 0x0200 , "SpecialMode" },
888
888
{ 0x0201 , "JPEGQuality" },
889
889
{ 0x0202 , "Macro" },
@@ -895,7 +895,7 @@ static tag_info_array tag_table_VND_OLYMPUS = {
895
895
TAG_TABLE_END
896
896
};
897
897
898
- static tag_info_array tag_table_VND_SAMSUNG = {
898
+ static const tag_info_array tag_table_VND_SAMSUNG = {
899
899
{ 0x0001 , "Version" },
900
900
{ 0x0021 , "PictureWizard" },
901
901
{ 0x0030 , "LocalLocationName" },
@@ -929,7 +929,7 @@ static tag_info_array tag_table_VND_SAMSUNG = {
929
929
TAG_TABLE_END
930
930
};
931
931
932
- static tag_info_array tag_table_VND_PANASONIC = {
932
+ static const tag_info_array tag_table_VND_PANASONIC = {
933
933
{ 0x0001 , "Quality" },
934
934
{ 0x0002 , "FirmwareVersion" },
935
935
{ 0x0003 , "WhiteBalance" },
@@ -1030,7 +1030,7 @@ static tag_info_array tag_table_VND_PANASONIC = {
1030
1030
TAG_TABLE_END
1031
1031
};
1032
1032
1033
- static tag_info_array tag_table_VND_DJI = {
1033
+ static const tag_info_array tag_table_VND_DJI = {
1034
1034
{ 0x0001 , "Make" },
1035
1035
{ 0x0003 , "SpeedX" },
1036
1036
{ 0x0004 , "SpeedY" },
@@ -1044,7 +1044,7 @@ static tag_info_array tag_table_VND_DJI = {
1044
1044
TAG_TABLE_END
1045
1045
};
1046
1046
1047
- static tag_info_array tag_table_VND_SONY = {
1047
+ static const tag_info_array tag_table_VND_SONY = {
1048
1048
{ 0x0102 , "Quality" },
1049
1049
{ 0x0104 , "FlashExposureComp" },
1050
1050
{ 0x0105 , "Teleconverter" },
@@ -1099,7 +1099,7 @@ static tag_info_array tag_table_VND_SONY = {
1099
1099
TAG_TABLE_END
1100
1100
};
1101
1101
1102
- static tag_info_array tag_table_VND_PENTAX = {
1102
+ static const tag_info_array tag_table_VND_PENTAX = {
1103
1103
{ 0x0000 , "Version" },
1104
1104
{ 0x0001 , "Mode" },
1105
1105
{ 0x0002 , "PreviewResolution" },
@@ -1184,7 +1184,7 @@ static tag_info_array tag_table_VND_PENTAX = {
1184
1184
TAG_TABLE_END
1185
1185
};
1186
1186
1187
- static tag_info_array tag_table_VND_MINOLTA = {
1187
+ static const tag_info_array tag_table_VND_MINOLTA = {
1188
1188
{ 0x0000 , "Version" },
1189
1189
{ 0x0001 , "CameraSettingsStdOld" },
1190
1190
{ 0x0003 , "CameraSettingsStdNew" },
@@ -1215,7 +1215,7 @@ static tag_info_array tag_table_VND_MINOLTA = {
1215
1215
TAG_TABLE_END
1216
1216
};
1217
1217
1218
- static tag_info_array tag_table_VND_SIGMA = {
1218
+ static const tag_info_array tag_table_VND_SIGMA = {
1219
1219
{ 0x0002 , "SerialNumber" },
1220
1220
{ 0x0003 , "DriveMode" },
1221
1221
{ 0x0004 , "ResolutionMode" },
@@ -1242,13 +1242,13 @@ static tag_info_array tag_table_VND_SIGMA = {
1242
1242
TAG_TABLE_END
1243
1243
};
1244
1244
1245
- static tag_info_array tag_table_VND_KYOCERA = {
1245
+ static const tag_info_array tag_table_VND_KYOCERA = {
1246
1246
{ 0x0001 , "FormatThumbnail" },
1247
1247
{ 0x0E00 , "PrintImageMatchingInfo" },
1248
1248
TAG_TABLE_END
1249
1249
};
1250
1250
1251
- static tag_info_array tag_table_VND_RICOH = {
1251
+ static const tag_info_array tag_table_VND_RICOH = {
1252
1252
{ 0x0001 , "MakerNoteDataType" },
1253
1253
{ 0x0002 , "Version" },
1254
1254
{ 0x0E00 , "PrintImageMatchingInfo" },
0 commit comments