From sean at rogue-research.com Mon Feb 3 11:21:16 2014 From: sean at rogue-research.com (Sean McBride) Date: Mon, 3 Feb 2014 11:21:16 -0500 Subject: [MINC-development] miset_apparent_record_dimension_flag() seemingly broken, 2nd paramater unused? Message-ID: <20140203162116.1938453493@mail.rogue-research.com> Hi all, The function miset_apparent_record_dimension_flag() seems broken. The second parameter looks like it's meant to return a value by reference, but it's just a plain 'int'. The clang analyzer rightly warns: libminc/libsrc2/dimension.c:639:3: Value stored to 'record_flag' is never read This is public API, should I thought I'd check here before making a patch... Cheers, -- ____________________________________________________________ Sean McBride, B. Eng sean at rogue-research.com Rogue Research www.rogue-research.com Mac Software Developer Montr?al, Qu?bec, Canada From vladimir.fonov at gmail.com Mon Feb 3 11:55:24 2014 From: vladimir.fonov at gmail.com (Vladimir S. FONOV) Date: Mon, 03 Feb 2014 11:55:24 -0500 Subject: [MINC-development] miset_apparent_record_dimension_flag() seemingly broken, 2nd paramater unused? In-Reply-To: <20140203162116.1938453493@mail.rogue-research.com> References: <20140203162116.1938453493@mail.rogue-research.com> Message-ID: <52EFC9FC.4060606@gmail.com> Looks like it is something that was programmed about 10 years ago: https://github.com/BIC-MNI/libminc/blame/develop/libsrc2/dimension.c#L639 And not being used in any of the minc tools that I know about ( https://github.com/BIC-MNI/minc-toolkit ) On 14-02-03 11:21 AM, Sean McBride wrote: > The function miset_apparent_record_dimension_flag() seems broken. The second parameter looks like it's meant to return a value by reference, but it's just a plain 'int'. The clang analyzer rightly warns: > > libminc/libsrc2/dimension.c:639:3: Value stored to 'record_flag' is never read > > This is public API, should I thought I'd check here before making a patch... -- Best regards, Vladimir S. FONOV ~ vladimir.fonov gmail.com From sean at rogue-research.com Mon Feb 3 11:58:54 2014 From: sean at rogue-research.com (Sean McBride) Date: Mon, 3 Feb 2014 11:58:54 -0500 Subject: [MINC-development] miset_apparent_record_dimension_flag() seemingly broken, 2nd paramater unused? In-Reply-To: <52EFC9FC.4060606@gmail.com> References: <20140203162116.1938453493@mail.rogue-research.com> <52EFC9FC.4060606@gmail.com> Message-ID: <20140203165854.2068301539@mail.rogue-research.com> On Mon, 3 Feb 2014 11:55:24 -0500, Vladimir S. FONOV said: >Looks like it is something that was programmed about 10 years ago: >https://github.com/BIC-MNI/libminc/blame/develop/libsrc2/dimension.c#L639 > >And not being used in any of the minc tools that I know about ( >https://github.com/BIC-MNI/minc-toolkit ) Makes sense... I guess if someone was actually using it, they would have discovered it doesn't work. :) So would you accept a patch that just removes it entirely? Or change the API to int*? Or...? Cheers, -- ____________________________________________________________ Sean McBride, B. Eng sean at rogue-research.com Rogue Research www.rogue-research.com Mac Software Developer Montr?al, Qu?bec, Canada From vladimir.fonov at gmail.com Mon Feb 3 12:22:18 2014 From: vladimir.fonov at gmail.com (Vladimir S. FONOV) Date: Mon, 03 Feb 2014 12:22:18 -0500 Subject: [MINC-development] miset_apparent_record_dimension_flag() seemingly broken, 2nd paramater unused? In-Reply-To: <20140203165854.2068301539@mail.rogue-research.com> References: <20140203162116.1938453493@mail.rogue-research.com> <52EFC9FC.4060606@gmail.com> <20140203165854.2068301539@mail.rogue-research.com> Message-ID: <52EFD04A.8090703@gmail.com> Hello, there are a whole bunch of api functions that is never used or tested anywhere. Basically most of API that works with record data type. On 14-02-03 11:58 AM, Sean McBride wrote: > On Mon, 3 Feb 2014 11:55:24 -0500, Vladimir S. FONOV said: > >> Looks like it is something that was programmed about 10 years ago: >> https://github.com/BIC-MNI/libminc/blame/develop/libsrc2/dimension.c#L639 >> >> And not being used in any of the minc tools that I know about ( >> https://github.com/BIC-MNI/minc-toolkit ) > > Makes sense... I guess if someone was actually using it, they would have discovered it doesn't work. :) > > So would you accept a patch that just removes it entirely? Or change the API to int*? Or...? > > Cheers, > -- Best regards, Vladimir S. FONOV ~ vladimir.fonov gmail.com From a.janke at gmail.com Mon Feb 3 16:38:40 2014 From: a.janke at gmail.com (Andrew Janke) Date: Tue, 4 Feb 2014 07:38:40 +1000 Subject: [MINC-development] miset_apparent_record_dimension_flag() seemingly broken, 2nd paramater unused? In-Reply-To: <20140203165854.2068301539@mail.rogue-research.com> References: <20140203162116.1938453493@mail.rogue-research.com> <52EFC9FC.4060606@gmail.com> <20140203165854.2068301539@mail.rogue-research.com> Message-ID: On 4 February 2014 02:58, Sean McBride wrote: > On Mon, 3 Feb 2014 11:55:24 -0500, Vladimir S. FONOV said: > >>Looks like it is something that was programmed about 10 years ago: >>https://github.com/BIC-MNI/libminc/blame/develop/libsrc2/dimension.c#L639 >> >>And not being used in any of the minc tools that I know about ( >>https://github.com/BIC-MNI/minc-toolkit ) > > Makes sense... I guess if someone was actually using it, they would have discovered it doesn't work. :) > > So would you accept a patch that just removes it entirely? Or change the API to int*? Or...? My feeling is to comment it out. There were a number of things that were put in minc2 for future development that has never happened. If there is anything that MINC suffers from it's over-complexity! Things like all the base MINC tools still use the MINC2 API in MINC1 compatibility mode, they were never ported. a