Return-Path: Delivered-To: apmail-apr-dev-archive@www.apache.org Received: (qmail 52618 invoked from network); 15 Mar 2004 02:15:27 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 15 Mar 2004 02:15:27 -0000 Received: (qmail 53918 invoked by uid 500); 15 Mar 2004 02:15:09 -0000 Delivered-To: apmail-apr-dev-archive@apr.apache.org Received: (qmail 53879 invoked by uid 500); 15 Mar 2004 02:15:09 -0000 Mailing-List: contact dev-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Delivered-To: mailing list dev@apr.apache.org Received: (qmail 53865 invoked from network); 15 Mar 2004 02:15:09 -0000 Message-ID: <1079316920.405511b8e1e64@webmail.mydomain.com> Date: Sun, 14 Mar 2004 18:15:20 -0800 From: rbb@rkbloom.net To: Garrett Rooney Cc: dev@apr.apache.org MIME-Version: 1.0 User-Agent: Internet Messaging Program (IMP) 3.1 X-Originating-IP: 24.211.145.52 X-SA-Exim-Mail-From: rbb@rkbloom.net Subject: Re: [PATCH] fix warnings in test/sockchild.c Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on calcium.dnsix.com X-Spam-Level: ** X-Spam-Status: No, hits=2.9 required=10.0 tests=NO_REAL_NAME, RCVD_IN_DYNABLOCK,RCVD_IN_SORBS autolearn=no version=2.63 X-Spam-Report: * 0.3 NO_REAL_NAME From: does not include a real name * 2.5 RCVD_IN_DYNABLOCK RBL: Sent directly from dynamic IP address * [24.211.145.52 listed in dnsbl.sorbs.net] * 0.1 RCVD_IN_SORBS RBL: SORBS: sender is listed in SORBS * [24.211.145.52 listed in dnsbl.sorbs.net] X-SA-Exim-Version: 3.1 (built Thu Oct 23 13:26:47 PDT 2003) X-SA-Exim-Scanned: Yes X-uvscan-result: clean (1B2hbp-0001Mo-6U) X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N applied and committed. Thanks, and keep 'em coming. Ryan Quoting Garrett Rooney : > The new sockchild.c file has a few warnings on OS X. > > /bin/sh /Users/rooneg/Hacking/apr/libtool --silent --mode=compile gcc > -g -O2 -DHAVE_CONFIG_H -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK > -no-cpp-precomp -I../include -o sockchild.lo -c sockchild.c && touch > sockchild.lo > sockchild.c: In function `main': > sockchild.c:57: warning: passing arg 3 of `apr_socket_recv' from > incompatible pointer type > sockchild.c:71: warning: passing arg 3 of `apr_socket_send' from > incompatible pointer type > > Here's a patch to correct them. > > -garrett > > Index: test/sockchild.c > =================================================================== > RCS file: /home/cvspublic/apr/test/sockchild.c,v > retrieving revision 1.1 > diff -u -r1.1 sockchild.c > --- test/sockchild.c 14 Mar 2004 20:30:20 -0000 1.1 > +++ test/sockchild.c 15 Mar 2004 00:38:30 -0000 > @@ -52,7 +52,7 @@ > > if (!strcmp("read", argv[1])) { > char datarecv[STRLEN]; > - int length = STRLEN; > + apr_size_t length = STRLEN; > > apr_status_t rv = apr_socket_recv(sock, datarecv, &length); > apr_socket_close(sock); > @@ -67,7 +67,7 @@ > exit(length); > } > else if (!strcmp("write", argv[1])) { > - int length = strlen(DATASTR); > + apr_size_t length = strlen(DATASTR); > apr_socket_send(sock, DATASTR, &length); > > apr_socket_close(sock); > >