[Boost-bugs] [Boost C++ Libraries] #10848: try_acquire_file_lock/ try_acquire_file_lock_sharable uses = instead of == in comparison

Subject: [Boost-bugs] [Boost C++ Libraries] #10848: try_acquire_file_lock/ try_acquire_file_lock_sharable uses = instead of == in comparison
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2014-12-04 18:13:38


#10848: try_acquire_file_lock/ try_acquire_file_lock_sharable uses = instead of ==
in comparison
---------------------------------------------+--------------------------
 Reporter: Steve Hickman <steve.hickman@…> | Owner: igaztanaga
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: interprocess
  Version: Boost 1.57.0 | Severity: Problem
 Keywords: |
---------------------------------------------+--------------------------
 The last line for both try_acquire_file_lock and
 try_acquire_file_lock_sharable is:

    return (acquired = true);

 It is unclear if the use of assignment ('=') instead of comparison ('==')
 here is intentional. My static analysis checker picked it up as a bug. If
 this is intentional, it should be documented with comments inline. Or,
 better yet, split into 2 lines of code so static analysis doesn't flag it.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/10848>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:17 UTC