================
@@ -227,6 +225,15 @@ New checks
   Finds instances where the result of a standard algorithm is used in a Boolean
   context without being compared to the end iterator.
 
+- New :doc:`bugprone-suspicious-fread-fwrite-return
+  <clang-tidy/checks/bugprone/suspicious-fread-fwrite-return>` check.
+
+  Finds suspicious checks of the return value of ``fread`` and ``fwrite``.
+  Developers sometimes mistakenly treat the result like the ``ssize_t``
+  return value of POSIX ``read`` and ``write``. ``fread`` and ``fwrite`` 
instead
+  return the number of elements transferred as a ``size_t``, making tests
+  such as ``<= 0`` incorrect.
----------------
EugeneZelenko wrote:

```suggestion
```

One sentence is enough.

https://github.com/llvm/llvm-project/pull/206359
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to