[MINC-users] arguments to "miget_real_value_hyperslab"

Steve M. Robbins steve at sumost.ca
Sat Dec 13 18:54:28 EST 2014


On December 13, 2014 01:41:55 AM Thomas Funck wrote:
> Hi,
> 
> I recently updated my version of minc with the latest version on github and
> have come across the following problem. I want to read a hyperslab with '
> miget_real_value_hyperslab", but I get this warning:
> 
> minc_helper.c:285:9: warning: passing argument 4 of
> ‘miget_real_value_hyperslab’ from incompatible pointer type [enabled by
> default] if(miget_real_value_hyperslab( img, MI_TYPE_DOUBLE,
> volume->wstarts, volume->wcount, volume->data) != MI_NOERROR) { ^
> In file included from /usr/local/include/minc2.h:12:0,
>                  from minc_helper.h:9,
>                  from minc_helper.c:1:
> /usr/local/include/minc2_api.h:1116:5: note: expected ‘const misize_t *’ but
> argument is of type ‘long int *’
> 
> 
> According to the documentation for the API (1), the "sizes" argument should
> be "long []", so why does the compiler complain that I'm not giving it a
> ‘const misize_t *’?

I guess the documentation is simply lagging the code: the header [1] does 
indicate that arguments 3 and 4 are type "const misize_t*".

-Steve

[1]  https://github.com/BIC-MNI/libminc/blob/master/libsrc2/minc2_api.h




More information about the MINC-users mailing list