[Opensim-dev] OpenSim codebase statistics.

Mariusz Nowostawski mariusz at nowostawski.org
Fri Jun 27 09:27:58 UTC 2008


> > 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3261 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://opensimulator.org/pipermail/opensim-dev/attachments/20080627/9ec4e0e1/attachment-0001.bin>


More information about the Opensim-dev mailing list