SyneRBI / SIRF

Main repository for the CCP SynerBI software
http://www.ccpsynerbi.ac.uk
Other
58 stars 29 forks source link

warning in gadgetron_image_wrap.h #573

Closed KrisThielemans closed 3 years ago

KrisThielemans commented 4 years ago

Compiling with VS 2015 gives

c:\users\krisf\documents\devel\sirf\src\xgadgetron\cgadgetron\include\sirf\gadgetron\gadgetron_image_wrap.h(319): warning C4715: 'sirf::ImageWrap::head': not all control paths return a value

I haven't checked, but it doesn't sound good.

evgueni-ovtchinnikov commented 4 years ago

ISMRMRD::ImageHeader& head() must return a reference to an image header. For as long as the image data type is one of the 8 allowed, returning a value is guaranteed. Otherwise a reference that could have been returned is nowhere to get from.