[Opensim-dev] OpenSim codebase statistics.

Kyle Hamilton aerowolf at gmail.com
Fri Jun 27 10:38:01 UTC 2008


There may be instances of "parameter X not used", though, which cannot
be easily removed.  (If there's no reason to use a given parameter
that's part of an API, then there's no reason to artificially inflate
the use-count.)

There are a lot of reasons that code can exist like this, especially
in a rapidly-moving project.  -1 for "warnings as errors" from me.

-Kyle H

On Fri, Jun 27, 2008 at 2:27 AM, Mariusz Nowostawski
<mariusz at nowostawski.org> wrote:
>> > Date: Fri, 27 Jun 2008 15:58:44 +0900
>> > From: mmazur at gmail.com
>> > To: opensim-dev at lists.berlios.de
>> > Subject: Re: [Opensim-dev] OpenSim codebase statistics.
>> >
>> > Hi,
>> >
>> > On Fri, 27 Jun 2008 15:53:28 +0900
>> > Ryan McDougall <sempuki1 at gmail.com> wrote:
>> >
>> > > As a new contributor, I think its fantastic to remove unused code.
>> > > However it could require a bit of effort to ensure no regressions.
>> >
>> > I'm curious how removing unused code can introduce regressions?
>> >
>> > Can plugins call unused code? Of course if they can, the code is no
>> > longer unused :)
>
>
>
> Stefan Andersson wrote:
>> Well, this is the tricky case; where the function is actually part
>> of an API.
>>
>> Either you tag it with something to say it's so (like
>> /// API Function : Do not change) or whatever the doc
>> standard dictates, or you create 'API Interfaces' that
>> are set in stone. (As in, until next proper 'release')
>>
>> Personally, I'd prefer the latter.
>>
>> But as it stands right now, it seems the third and only way is to mail
>> the dev list about it, remove it in a well-encapsulated revision, and
>> see if anyone shouts.
>
>
> Hi,
>
> Just to clarify - public methods and class attributes are fine not to be
> referenced and these are not reported by the compiler as warnings. So any
> public APIs or public methods/fields referenced ONLY from plugins are not
> reported as problems anyway.
>
> *All* of the current warning about unused code are about private fields,
> method's variables and private methods. ALL the code causing those warnings
> could be easily removed, because none is going to reference the appropriate
> piece of code anyway (these are all private).
>
> Note - the compiler warning is the warning for a reason. It indicates
> (almost always) that something is done wrong ;o) and should be fixed.
>
>
> --
> cheers
> Mariusz
>
> _______________________________________________
> Opensim-dev mailing list
> Opensim-dev at lists.berlios.de
> https://lists.berlios.de/mailman/listinfo/opensim-dev
>
>



More information about the Opensim-dev mailing list