Skip to main content.
home | support | download

Back to List Archive

Re: Alpha version Phrase Search

From: Ron Samuel Klatchko <rsk(at)>
Date: Mon Apr 10 2000 - 17:52:38 GMT
SRE wrote:
> >> search.c:362: warning: passing arg 4 of `qsort' from incompatible pointer type
> >A pointer to a comparison function. It is not important. It works.
> How about casting as needed to eliminate the warning?
> I've found that things which happen to work on SunOS may
> not just happen to work on HPUX, for example, but they
> often will work if cast properly.

Why not change the definition of the comparison function to correctly
match the qsort type.  The problem with a cast is that it might quiet
the compiler but could mask a real problem.

> >> httpserver.c:134: warning: long int format, pid_t arg (arg 5)
> >Warnings in http.c and httpserver.c are from the original
> >files. I have not modified these files.
> Hmmm. I didn't see that when I compiled the previous version.
> Could it be system include file differences?

It could be an issue with the actual type of pid_t.  The *printf
functions don't have types to match the local system type definitions. 
So when you need to print them, you have to look beneath the covers and
code in the actual type.  Unfortunately, not very generic.  This would
definitely be easier to solve with C++ streams.

        Ron Samuel Klatchko - Senior Software Jester
            Brightmail Inc -
Received on Mon Apr 10 13:56:49 2000