[MINC-users] xdisp compile errors in minc-toolkit on osx 10.7.5

Mishkin Derakhshan mishkind at gmail.com
Tue Dec 10 01:26:20 EST 2013


Hi,
I ran into the following error(s) when trying to build from source.

/Users/mishkin/minc-toolkit/xdisp/reshape.c:158:5: error: non-void function
'Crop' should return a value [-Wreturn-type]
    return;

My solution was to open up xdisp/reshape.c and xdisp/tic.c and change
"return;" to "return 0;"
After that everything compiled/installed. Not sure if that was the
"correct" thing to do and if it should be changed in the git repo, but I
thought I would let you all know.
mishkin


[ 96%] Built target olgx
[ 96%] Building C object xdisp/CMakeFiles/xdisp.dir/reshape.c.o
/Users/mishkin/minc-toolkit/xdisp/reshape.c:43:19: warning: assigning to
'char *' from 'byte *' (aka 'unsigned char *') converts between
      pointers to integer types with different sign [-Wpointer-sign]
    theImage->data=&byte_Image[zWidth*zHeight*(bitmap_pad/8)*
                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/mishkin/minc-toolkit/xdisp/reshape.c:69:4: warning: implicit
declaration of function 'nneighbour_byte_to_byte' is invalid in C99
      [-Wimplicit-function-declaration]
          nneighbour_byte_to_byte ( &tmp_byte[zWidth*zHeight*i], zWidth,
zHeight,
          ^
/Users/mishkin/minc-toolkit/xdisp/reshape.c:91:19: warning: assigning to
'char *' from 'byte *' (aka 'unsigned char *') converts between
      pointers to integer types with different sign [-Wpointer-sign]
    theImage->data=&byte_Image[(bitmap_pad/8)*w*h*
                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/mishkin/minc-toolkit/xdisp/reshape.c:122:1: warning: control reaches
end of non-void function [-Wreturn-type]
}
^
/Users/mishkin/minc-toolkit/xdisp/reshape.c:147:1: warning: control reaches
end of non-void function [-Wreturn-type]
}
^
/Users/mishkin/minc-toolkit/xdisp/reshape.c:158:5: error: non-void function
'Crop' should return a value [-Wreturn-type]
    return;
    ^
/Users/mishkin/minc-toolkit/xdisp/reshape.c:233:18: warning: assigning to
'char *' from 'byte *' (aka 'unsigned char *') converts between
      pointers to integer types with different sign [-Wpointer-sign]
  theImage->data = &byte_Image[(bitmap_pad/8)*zWidth*zHeight*
                 ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/mishkin/minc-toolkit/xdisp/reshape.c:463:5: error: non-void function
'Reorient_Volume' should return a value [-Wreturn-type]
    return;
    ^
6 warnings and 2 errors generated.
make[2]: *** [xdisp/CMakeFiles/xdisp.dir/reshape.c.o] Error 1
make[1]: *** [xdisp/CMakeFiles/xdisp.dir/all] Error 2
make: *** [all] Error 2


More information about the MINC-users mailing list