From jordigh at octave.org Thu May 3 16:05:57 2012 From: jordigh at octave.org (=?UTF-8?Q?Jordi_Guti=C3=A9rrez_Hermoso?=) Date: Thu, 3 May 2012 16:05:57 -0400 Subject: [MINC-development] Problem with casting hid_t to pointer in hdf_convenience.c Message-ID: Hi, I'm trying to compile this MINC 2 git repo, at revision 2c967639bb: https://github.com/BIC-MNI/minc However, I'm facing the following warnings, which I am pretty sure are not safe to ignore: cc1: warnings being treated as errors minc/libsrc/hdf_convenience.c: In function ?hdf_attput?: minc/libsrc/hdf_convenience.c:1110: error: cast to pointer from integer of different size minc/libsrc/hdf_convenience.c: In function ?hdf_copy_attr?: minc/libsrc/hdf_convenience.c:2054: error: cast from pointer to integer of different size The problem is that at these two locations, hid_t are being cast to and from pointers. Now, hid_t is an int on my machine, but on a 64-bit machine, ints are 32-bits, so they can't hold pointers, which are 64-bits wide. So this casting won't work. Furthermore, this seems to be breaking the HDF5 API. I don't see in the API documentation any mention that hid_t can be used as a pointer, so it's not clear to me that HDF5 itself needs a patch to conditionally define hid_t according to the architecture. This looks like an unsafe hack that minc tools are doing. This all matters to me because I'm trying to debug a segfault with dcm2mnc, but first I need to be able to cleanly compile minc-tools, if nothing else, to compile in debug symbols. Thanks, - Jordi G. H. From jordigh at octave.org Mon May 14 18:20:29 2012 From: jordigh at octave.org (=?UTF-8?Q?Jordi_Guti=C3=A9rrez_Hermoso?=) Date: Mon, 14 May 2012 18:20:29 -0400 Subject: [MINC-development] Fix for a segfault in dcm2mnc Message-ID: Hi, I have patched on the development branch a problem with an uninitialised variable that was causing dcm2mnc to segfault. You can pull my fix here: http://inversethought.com/hg/minc-tools/graph There is another commit there for silencing some warnings that could be problematic. HTH, - Jordi G. H. From a.janke at gmail.com Tue May 15 10:07:51 2012 From: a.janke at gmail.com (Andrew Janke) Date: Wed, 16 May 2012 00:07:51 +1000 Subject: [MINC-development] Fix for a segfault in dcm2mnc In-Reply-To: References: Message-ID: Hi Jordi, Thanks for the patches, I have made a commit to the develop tree here with them: https://github.com/BIC-MNI/minc/commit/9459071d2ccf1c32a92e926f14f612e6262f4c3c Thanks again, a On 15 May 2012 08:20, Jordi Guti?rrez Hermoso wrote: > Hi, I have patched on the development branch a problem with an > uninitialised variable that was causing dcm2mnc to segfault. You can > pull my fix here: > > ? ?http://inversethought.com/hg/minc-tools/graph > > There is another commit there for silencing some warnings that could > be problematic. > > HTH, > - Jordi G. H. > _______________________________________________ > MINC-development mailing list > MINC-development at bic.mni.mcgill.ca > http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-development