Ticket #12301 (closed defect: fixed)
Upgrade included libtiff to 4.0 to fix 64 bit build issues
| Reported by: | dsmtoday | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | 3.0 |
| Component: | 3rdparty | Version: | 2.9.1 |
| Keywords: | tiff 64bit | Cc: | |
| Blocked By: | Patch: | no | |
| Blocking: |
Description
When compiling recent versions of wxWidgets in 64bit mode under Visual Studio, a lot of warnings about size_t to int or unsigned pop up. Almost all of these are harmless and can easily be ignored. However, there is one warning about a size_t pointer to unsigned pointer that comes up, and it is dangerous.
There is an easy work around for this -- use a temporary unsigned variable and pass that to the function that is expecting a an unsigned pointer.
Here's the patch (and attached).
--- wxWidgets-2.9.1/src/tiff/libtiff/tif_dirinfo.c 2010-07-14 23:27:45.269903700 -0700
+++ wxWidgets\src\tiff\libtiff\tif_dirinfo.c 2010-07-31 12:12:39.043180700 -0700
@@ -737,6 +737,7 @@
_TIFFFindFieldInfoByName(TIFF* tif, const char *field_name, TIFFDataType dt)
{
int i, n;
+ unsigned nfields;
if (tif->tif_foundfield
&& streq(tif->tif_foundfield->field_name, field_name)
@@ -751,11 +752,13 @@
key.field_name = (char *)field_name;
key.field_type = dt;
+ nfields = tif->tif_nfields;
ret = (const TIFFFieldInfo **) lfind(&pkey,
tif->tif_fieldinfo,
- &tif->tif_nfields,
+ &nfields,
sizeof(TIFFFieldInfo *),
tagNameCompare);
+ tif->tif_nfields = nfields;
return (ret) ? (*ret) : NULL;
} else
for (i = 0, n = tif->tif_nfields; i < n; i++) {
Attachments
Change History
Note: See
TracTickets for help on using
tickets.

