Red Hat Bugzilla – Bug 111254
nested assignment in assert
Last modified: 2014-08-31 19:25:37 EDT
Description of problem:
I just tried to compile package squid-2.5.STABLE3-0 from Fedora.
The compiler said
ntlm/auth_ntlm.c(683): warning #187: use of "=" where "==" may have
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):
Steps to Reproduce:
I included a patch for this in the latest rawhide squid rpm
Patch merged into upstream, thanks to a very observant user who
noticed this patch in Fedora.
Squid HTTP Proxy project