You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@trafficserver.apache.org by Igor Galić <i....@brainsware.org> on 2011/09/27 12:07:15 UTC
Unused classes
Hi folks,
I was examining the doxygen generated API for some clues:
http://ci.apache.org/projects/trafficserver/trunk/doxygen/
when I stumbled across a couple of oddities. First off, this thing
hasn't been regenerated since the beginning of this year. I have been
focusing my attention on the Admin docs, so I didn't notice this -
but I've already talked to Infra about it.
Anyway, if you think that for our discussion here this isn't recent
enough a version you can busy your machine for some 20 minutes to
run make doxygen.
In trunk I have added:
EXCLUDE_PATTERNS = test_*.cc
EXCLUDE_PATTERNS += test_*.h
EXCLUDE_PATTERNS += test_*.i
because I thought ``class Foo'' didn't really contribute to the
understanding of our API or the server's functionality.
Now, ignoring monstrosities like
http://ci.apache.org/projects/trafficserver/trunk/doxygen/classContinuation.html
the reason I'm writing are classes such as *Exception and *FatalClass:
http://ci.apache.org/projects/trafficserver/trunk/doxygen/classFileStatException.html
http://ci.apache.org/projects/trafficserver/trunk/doxygen/structMachineFatalClass.html
Which aren't used anywhere in our code.
Maybe my understanding here is wrong and they are made usable and are actually used
by their existence alone?
If not -- do we want to use them?
What else is not used and could be removed? Or moved to attic?
i
--
Igor Galić
Tel: +43 (0) 664 886 22 883
Mail: i.galic@brainsware.org
URL: http://brainsware.org/
GPG: 571B 8B8A FC97 266D BDA3 EF6F 43AD 80A4 5779 3257
Re: Unused classes
Posted by Leif Hedstrom <zw...@apache.org>.
Hmmm, I haven't looked, but I'm wondering if these are objects we should be using, but never got implemented or refactored?
-- leif
On Sep 27, 2011, at 11:17 AM, Igor Galić <i....@brainsware.org> wrote:
>
>> the reason I'm writing are classes such as *Exception and
>> *FatalClass:
>>
>> http://ci.apache.org/projects/trafficserver/trunk/doxygen/classFileStatException.html
>> http://ci.apache.org/projects/trafficserver/trunk/doxygen/structMachineFatalClass.html
>>
>> Which aren't used anywhere in our code.
>
> Which, of course, is moo-poo..
>
> proxy/http/HttpAccept.cc:84: MachineFatal("HTTP accept received fatal error: errno = %d", -((int)(intptr_t)data));
> proxy/http/HttpProxyServerMain.cc:230: ProcessFatal("accept port %d is not between 1 and 65535 ", "please check configuration", port);
> proxy/Main.cc:803: MachineFatal("too few file descritors (%d) available", fds_limit);
> proxy/Main.cc:842: ProcessFatal("Traffic Server must not be run as root");
> proxy/Main.cc:1681: ProcessFatal("unable to initialize storage, (Re)Configuration required\n");
> proxy/Main.cc:1845: ProcessFatal("\ncannot listen on port %d.\naccept port cannot be larger that 65535.\n"
>
> The other three classes however (or their #defines) are not used RequestFatal, ProcessorFatal, ThreadFatal
>
>
> The attached patch removes all Error.h includes from where they weren't needed.
> It also removes ink_exception.h
>
> Any objections to apply it?
> This and other patches removing obviously unused classes/files?
>
> i
>
> --
> Igor Galić
>
> Tel: +43 (0) 664 886 22 883
> Mail: i.galic@brainsware.org
> URL: http://brainsware.org/
> GPG: 571B 8B8A FC97 266D BDA3 EF6F 43AD 80A4 5779 3257
> <rem_err_exc.diff>
Re: Unused classes
Posted by Igor Galić <i....@brainsware.org>.
> the reason I'm writing are classes such as *Exception and
> *FatalClass:
>
> http://ci.apache.org/projects/trafficserver/trunk/doxygen/classFileStatException.html
> http://ci.apache.org/projects/trafficserver/trunk/doxygen/structMachineFatalClass.html
>
> Which aren't used anywhere in our code.
Which, of course, is moo-poo..
proxy/http/HttpAccept.cc:84: MachineFatal("HTTP accept received fatal error: errno = %d", -((int)(intptr_t)data));
proxy/http/HttpProxyServerMain.cc:230: ProcessFatal("accept port %d is not between 1 and 65535 ", "please check configuration", port);
proxy/Main.cc:803: MachineFatal("too few file descritors (%d) available", fds_limit);
proxy/Main.cc:842: ProcessFatal("Traffic Server must not be run as root");
proxy/Main.cc:1681: ProcessFatal("unable to initialize storage, (Re)Configuration required\n");
proxy/Main.cc:1845: ProcessFatal("\ncannot listen on port %d.\naccept port cannot be larger that 65535.\n"
The other three classes however (or their #defines) are not used RequestFatal, ProcessorFatal, ThreadFatal
The attached patch removes all Error.h includes from where they weren't needed.
It also removes ink_exception.h
Any objections to apply it?
This and other patches removing obviously unused classes/files?
i
--
Igor Galić
Tel: +43 (0) 664 886 22 883
Mail: i.galic@brainsware.org
URL: http://brainsware.org/
GPG: 571B 8B8A FC97 266D BDA3 EF6F 43AD 80A4 5779 3257