Bug 111254 - nested assignment in assert
Summary: nested assignment in assert
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: squid
Version: 1
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jay Fenlason
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-12-01 14:37 UTC by d.binderman
Modified: 2014-08-31 23:25 UTC (History)
1 user (show)

Fixed In Version: squid-2.5.STABLE5-2
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-04-05 21:22:00 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description d.binderman 2003-12-01 14:37:34 UTC
Description of problem:
I just tried to compile package squid-2.5.STABLE3-0 from Fedora.

The compiler said

1.

ntlm/auth_ntlm.c(683): warning #187: use of "=" where "==" may have
been intended

The source code is

    assert(auth_user->auth_type = AUTH_NTLM);

This code might be better as 

    assert(auth_user->auth_type == AUTH_NTLM);

Putting assignments in asserts is not recommended. The assignment
will disappear when asserts are switched off by the -DNDEBUG option.


Version-Release number of selected component (if applicable):
squid-2.5.STABLE3-0 

How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 Jay Fenlason 2004-04-05 21:22:00 UTC
I included a patch for this in the latest rawhide squid rpm

Comment 2 Henrik Nordstrom 2004-04-06 14:01:58 UTC
Patch merged into upstream, thanks to a very observant user who
noticed this patch in Fedora.

Regards
Henrik Nordström
Squid HTTP Proxy project


Note You need to log in before you can comment on or make changes to this bug.