You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apr.apache.org by Cliff Woolley <cl...@yahoo.com> on 2001/06/20 02:30:13 UTC

APR file_io/win32/readwrite.c


In the following lines from readwrite.c line 90, should the if()
conditional clause really be an assignment, or is it a typo?  It really
seems like it should be an equality test to me...

                rv = apr_get_os_error();
                if (rv = APR_FROM_OS_ERROR(ERROR_BROKEN_PIPE))
                    return APR_SUCCESS;

--Cliff


--------------------------------------------------------------
   Cliff Woolley
   cliffwoolley@yahoo.com
   Charlottesville, VA



Re: APR file_io/win32/readwrite.c

Posted by Cliff Woolley <cl...@yahoo.com>.
On Tue, 19 Jun 2001, William A. Rowe, Jr. wrote:

> > I guess MSVC doesn't warn about such things??  Beats the hell out of me.
> > Obviously we'd have seen it in a gcc warning if it were on the Unix
> > side...
>
> It's a level 4 (think -wall) warning on my msvc5.  I try building at
> least once a week against that standard, but as you might expect,
> there are a ton of trivial errors emitted, so it becomes somewhat
> illegible.

Yeah... I figured as much.

> Thanks again for catching this quickly, Cliff!

Actually, I just stumbled across it while looking at the XTHREAD stuff.
And as it turns out, unfortunately, there was nothing quick about it...
that line's been broken for 11.5 months (since the pre-a5 era).  :-/  Oh
well, it's fixed now.

--Cliff


--------------------------------------------------------------
   Cliff Woolley
   cliffwoolley@yahoo.com
   Charlottesville, VA



Re: APR file_io/win32/readwrite.c

Posted by "William A. Rowe, Jr." <ad...@rowe-clan.net>.
From: "Cliff Woolley" <cl...@yahoo.com>
Sent: Tuesday, June 19, 2001 7:57 PM


> On Tue, 19 Jun 2001, Roy T. Fielding wrote:
> 
> > On Tue, Jun 19, 2001 at 08:30:13PM -0400, Cliff Woolley wrote:
> > > In the following lines from readwrite.c line 90, should the if()
> > > conditional clause really be an assignment, or is it a typo?  It really
> > > seems like it should be an equality test to me...
> > >
> > >                 rv = apr_get_os_error();
> > >                 if (rv = APR_FROM_OS_ERROR(ERROR_BROKEN_PIPE))
> > >                     return APR_SUCCESS;
> >
> > Definitely a bug.  Why isn't it giving a warning?
> 
> I guess MSVC doesn't warn about such things??  Beats the hell out of me.
> Obviously we'd have seen it in a gcc warning if it were on the Unix
> side...

It's a level 4 (think -wall) warning on my msvc5.  I try building at least once
a week against that standard, but as you might expect, there are a ton of trivial
errors emitted, so it becomes somewhat illegible.

Thanks again for catching this quickly, Cliff!

Bill


Re: APR file_io/win32/readwrite.c

Posted by Cliff Woolley <cl...@yahoo.com>.
On Tue, 19 Jun 2001, Roy T. Fielding wrote:

> On Tue, Jun 19, 2001 at 08:30:13PM -0400, Cliff Woolley wrote:
> > In the following lines from readwrite.c line 90, should the if()
> > conditional clause really be an assignment, or is it a typo?  It really
> > seems like it should be an equality test to me...
> >
> >                 rv = apr_get_os_error();
> >                 if (rv = APR_FROM_OS_ERROR(ERROR_BROKEN_PIPE))
> >                     return APR_SUCCESS;
>
> Definitely a bug.  Why isn't it giving a warning?

I guess MSVC doesn't warn about such things??  Beats the hell out of me.
Obviously we'd have seen it in a gcc warning if it were on the Unix
side...

--Cliff


--------------------------------------------------------------
   Cliff Woolley
   cliffwoolley@yahoo.com
   Charlottesville, VA



Re: APR file_io/win32/readwrite.c

Posted by "Roy T. Fielding" <fi...@ebuilt.com>.
On Tue, Jun 19, 2001 at 08:30:13PM -0400, Cliff Woolley wrote:
> In the following lines from readwrite.c line 90, should the if()
> conditional clause really be an assignment, or is it a typo?  It really
> seems like it should be an equality test to me...
> 
>                 rv = apr_get_os_error();
>                 if (rv = APR_FROM_OS_ERROR(ERROR_BROKEN_PIPE))
>                     return APR_SUCCESS;

Definitely a bug.  Why isn't it giving a warning?

....Roy