cppcheck: warn on use of flock

This commit is contained in:
David Adam
2016-11-30 18:14:54 +08:00
parent 2b0bad889a
commit bf53f39cdd
3 changed files with 17 additions and 0 deletions

View File

@@ -1,5 +1,6 @@
<?xml version="1.0"?>
<![CDATA[
<!-- Sadly we can't enable the following two rules since doing so causes false
positives in standard header files rather than just project specific
source files. If we can find a way to enable these rules by also
@@ -22,3 +23,13 @@
</message>
</rule>
<--!>
]]>
<rule>
<pattern>flock \(</pattern>
<message>
<id>flockSemanticsWarning</id>
<severity>warning</severity>
<summary>flock has a fallback implemented in terms of fcntl; ensure that the fcntl semantics will apply (see http://0pointer.de/blog/projects/locking.html)</summary>
</message>
</rule>