Hi folks,

When I ran valgrind on a project that depends on VXL, it reported the following errors:

==4803== Conditional jump or move depends on uninitialised value(s)
==4803==    at 0x5BB8A3F: vil_tiff_header::read_header() (vil_tiff_header.cxx:189)
==4803==    by 0x5BB2677: vil_tiff_header::vil_tiff_header(tiff*) (in /home/builds/vxl/bin-x64-deb/lib/libvil.so)
==4803==    by 0x5BAC2D7: vil_tiff_file_format::make_input_image(vil_stream*) (vil_tiff.cxx:189)
==4803==    by 0x5C94D0C: vil_load_image_resource_raw(vil_stream*, bool) (vil_load.cxx:27)
==4803==    by 0x5C94F3D: vil_load_image_resource_raw(char const*, bool) (vil_load.cxx:55)
==4803==    by 0x5C95146: vil_load_image_resource(char const*, bool) (vil_load.cxx:76)

==4803==
==4803== Conditional jump or move depends on uninitialised value(s)
==4803==    at 0x5BB8B0A: vil_tiff_header::read_header() (vil_tiff_header.cxx:196)
==4803==    by 0x5BB2677: vil_tiff_header::vil_tiff_header(tiff*) (in /home/builds/vxl/bin-x64-deb/lib/libvil.so)
==4803==    by 0x5BAC2D7: vil_tiff_file_format::make_input_image(vil_stream*) (vil_tiff.cxx:189)
==4803==    by 0x5C94D0C: vil_load_image_resource_raw(vil_stream*, bool) (vil_load.cxx:27)
==4803==    by 0x5C94F3D: vil_load_image_resource_raw(char const*, bool) (vil_load.cxx:55)
==4803==    by 0x5C95146: vil_load_image_resource(char const*, bool) (vil_load.cxx:76)



vil_tiff_header.cxx at line 187 tries to read the tag with rationale type. But it appears that TIFF lib (Version 3.8.2 in v3p folder) assigns a float value for tag TIFFTAG_XRESOLUTION and TIFFTAG_XRESOLUTION.  I also check the current release of TIFF lib ver. 4.0.1, which also uses float type.  Hence, it is probably a good idea to change these to float type accordingly.  I just do not want to accidentally break someone's program in run-time as such change will not raise compilation errors or warnings.  Comments?



Best regards,
Gehua Yang