Please take our Survey
logo       

Choosing A Webhost:
A web hosting service is a type of Internet hosting service that allows individuals and organizations to provide their own website accessible via the World Wide Web. Web hosts are companies that provide space on a server they own for use by their clients as well as providing Internet connectivity, typically in a data center. Web hosts can also provide data center space and connectivity to the Internet for servers they do not own to be located in their data center, called colocation. more...

Re: cast warnings: msg#00371

Subject: Re: cast warnings
On Wednesday 28 January 2004 15:34, Michal Jaegermann wrote:
> On Wed, Jan 28, 2004 at 12:57:41PM -0500, Gene C. wrote:
> > I went to some effort to clean up nessus so building it had no cast
> > messages. But was it worth it.
>
> Here you are. :-)

My effort were to get rid of the cast messages and not to really fix the code 
(see below).  I did check the underlying code of the called function and it 
is going to work.  Nessus keeps a lot of its data in tables where an element 
"value" may contain a pointer or an integer having various meanings depending 
on the setting of another int variable in the element.  The storage for the 
"value" is defined as "void *" so the right size will be allocated.

>
> > For example, you have a function which extracts
> > something from an array/table and may return a pointer sometimes and
> > other times an integer.
>
> Then really union should have been used; but sources of X, for
> example, are chock-full of such junk and that's life.

Yes, sigh, you are right.  Doing things the right way would involve using a 
union.  

If I was the owner of a package, I might (almost assuredly would) do it the 
right way.  But, for many upstream package owners/originators/maintainers, 
they are more interested in package functionality than in doing things "the 
right way" so that the "right thing" is done regardless of the 
architecture/platform and moving to a system with 128 bit address still 
works.

If a package owner decides to do things "the right way", then it will likely 
get down.  For someone downstream to submit (likely extensive) patches is a 
whole different situation.  I will need to think about whether it is worth 
the attempt.

Thanks for your comment ... it clarified things for me.  The use of unions had 
occurred to me but I rejected it as too intrusive into the package owners 
efforts.
-- 
Gene


-- 
fedora-test-list mailing list
fedora-test-list@xxxxxxxxxx
http://www.redhat.com/mailman/listinfo/fedora-test-list



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
qnx.openqnx.dev...    gcc.libstdc++.c...    solaris.opensol...    information-ret...    misc.misterhous...    web.catalyst.ge...    apache.webservi...    redhat.release....    hardware.lirc/2...    kernel.autofs/2...    technology.sust...    linux.vdr/2003-...    editors.lyx.gen...    org.user-groups...    netbsd.devel.pk...    xdg.devel/2004-...    version-control...    jakarta.slide.d...    debian.packages...    creativecommons...    ports.ppc.embed...    bug-tracking.bu...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe