Re: Installation problems

"Jeffrey D. Carter" <[email protected]>
Newsgroups gmane.mail.exim.spamassassin
Message-ID <[email protected]>
Marc MERLIN <[email protected]>  writes:
>-------------------------------------------------------------------------<
| On Thu, Mar 18, 2004 at 12:13:52PM +0000, John Horne wrote:
| On Thu, Mar 18, 2004 at 01:06:57PM +0000, John Horne wrote:
| > Hello,
| > 
| > Compiling sa-exim 4.0 on a Solaris 9 system (gcc version 2.95.3
| > 20010315), gives two warnings:
| > 
| >   ../Local/sa-exim.c: In function `local_scan':
| >   ../Local/sa-exim.c:1100: warning: assignment makes pointer from
| >   integer without a cast
| >   ../Local/sa-exim.c:1101: warning: assignment makes pointer from
| >   integer without a cast
| 
| I take it we're talking about this:
|             char *start;
|             char *end;
|             char *mesgid=NULL;
| 
|             start=index(buffer, '<');
|             end=index(buffer, '>');
|  
|             if (start == NULL || end == NULL)
| 
| My index man page says that it's supposed to return a char *
| What does yours?
| 
| Marc
>-------------------------------------------------------------------------<

Mine says index() and rindex() are non-standard, and should be replaced
with strchr() and strrchr() (respectively), as found in <string.h>. Many
OS'es provide the obsolete forms in <strings.h>, or if you #define/-D
some special macro. But in almost all cases it's just easier to fix it.

Jeff Carter
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.