You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by ro...@apache.org on 2006/06/05 03:52:16 UTC

svn commit: r411637 - /apr/apr/trunk/network_io/unix/sendrecv.c

Author: rooneg
Date: Sun Jun  4 18:52:16 2006
New Revision: 411637

URL: http://svn.apache.org/viewvc?rev=411637&view=rev
Log:
Fix warning about unused variables on new versions of FreeBSD.

Submitted by: Philip M. Gollucci <pgollucci p6m7g8.com>

* network_io/unix/sendrecv.c
  (apr_socket_sendfile): Only declare i if we're on a suitable version of
   FreeBSD.

Modified:
    apr/apr/trunk/network_io/unix/sendrecv.c

Modified: apr/apr/trunk/network_io/unix/sendrecv.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/network_io/unix/sendrecv.c?rev=411637&r1=411636&r2=411637&view=diff
==============================================================================
--- apr/apr/trunk/network_io/unix/sendrecv.c (original)
+++ apr/apr/trunk/network_io/unix/sendrecv.c Sun Jun  4 18:52:16 2006
@@ -409,7 +409,10 @@
                                  apr_size_t * len, apr_int32_t flags)
 {
     off_t nbytes = 0;
-    int rv, i;
+    int rv;
+#if defined(__FreeBSD_version) && __FreeBSD_version < 460001
+    int i;
+#endif
     struct sf_hdtr headerstruct;
     apr_size_t bytes_to_send = *len;
 



Re: svn commit: r411637 - /apr/apr/trunk/network_io/unix/sendrecv.c

Posted by Maxime Petazzoni <ma...@bulix.org>.
Hi,

> -    int rv, i;
> +    int rv;
> +#if defined(__FreeBSD_version) && __FreeBSD_version < 460001
> +    int i;
> +#endif

I don't want to mess up with APR development too much, but why don't
you declare i in the else if block just a few lines after ? i is
obviously only used there, and this block is already in a similar
pre-compilator conditional block. Would improve code readability I
guess.

My 2 ยข,
- Sam
-- 
Maxime Petazzoni (http://www.bulix.org)
 -- gone crazy, back soon. leave message.

Re: svn commit: r411637 - /apr/apr/trunk/network_io/unix/sendrecv.c

Posted by Garrett Rooney <ro...@electricjellyfish.net>.
On 6/4/06, Philip M. Gollucci <pg...@p6m7g8.com> wrote:
> rooneg@apache.org wrote:
> > Author: rooneg
> > Date: Sun Jun  4 18:52:16 2006
> > New Revision: 411637
> >
> > URL: http://svn.apache.org/viewvc?rev=411637&view=rev
> > Log:
> > Fix warning about unused variables on new versions of FreeBSD.
> >
> > Submitted by: Philip M. Gollucci <pgollucci p6m7g8.com>
> >
> > * network_io/unix/sendrecv.c
> >   (apr_socket_sendfile): Only declare i if we're on a suitable version of
> >    FreeBSD.
>
> Thanks Garret.  Is it worth it to propose back port to the other apr
> branches ?

I guess I can backport it to whatever release branches you like.
Personally, I'm not overly worried about it, I mean it's just a tiny
little warning...

-garrett

Re: svn commit: r411637 - /apr/apr/trunk/network_io/unix/sendrecv.c

Posted by "Philip M. Gollucci" <pg...@p6m7g8.com>.
rooneg@apache.org wrote:
> Author: rooneg
> Date: Sun Jun  4 18:52:16 2006
> New Revision: 411637
> 
> URL: http://svn.apache.org/viewvc?rev=411637&view=rev
> Log:
> Fix warning about unused variables on new versions of FreeBSD.
> 
> Submitted by: Philip M. Gollucci <pgollucci p6m7g8.com>
> 
> * network_io/unix/sendrecv.c
>   (apr_socket_sendfile): Only declare i if we're on a suitable version of
>    FreeBSD.

Thanks Garret.  Is it worth it to propose back port to the other apr 
branches ?

-- 
------------------------------------------------------------------------
Philip M. Gollucci (pgollucci@p6m7g8.com) 323.219.4708
Consultant / http://p6m7g8.net/Resume/resume.shtml
Senior Software Engineer - TicketMaster - http://ticketmaster.com
1024D/A79997FA F357 0FDD 2301 6296 690F  6A47 D55A 7172 A799 97F

"It takes a minute to have a crush on someone, an hour to like someone,
and a day to love someone, but it takes a lifetime to forget someone..."

Re: svn commit: r411637 - /apr/apr/trunk/network_io/unix/sendrecv.c

Posted by "Philip M. Gollucci" <pg...@p6m7g8.com>.
rooneg@apache.org wrote:
> Author: rooneg
> Date: Sun Jun  4 18:52:16 2006
> New Revision: 411637
> 
> URL: http://svn.apache.org/viewvc?rev=411637&view=rev
> Log:
> Fix warning about unused variables on new versions of FreeBSD.
> 
> Submitted by: Philip M. Gollucci <pgollucci p6m7g8.com>
> 
> * network_io/unix/sendrecv.c
>   (apr_socket_sendfile): Only declare i if we're on a suitable version of
>    FreeBSD.

Thanks Garret.  Is it worth it to propose back port to the other apr 
branches ?

-- 
------------------------------------------------------------------------
Philip M. Gollucci (pgollucci@p6m7g8.com) 323.219.4708
Consultant / http://p6m7g8.net/Resume/resume.shtml
Senior Software Engineer - TicketMaster - http://ticketmaster.com
1024D/A79997FA F357 0FDD 2301 6296 690F  6A47 D55A 7172 A799 97F

"It takes a minute to have a crush on someone, an hour to like someone,
and a day to love someone, but it takes a lifetime to forget someone..."