<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/187830>187830</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[clang-tidy] bzero(3) is not bugprone nor unsafe
</td>
</tr>
<tr>
<th>Labels</th>
<td>
clang-tidy
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
alejandro-colomar
</td>
</tr>
</table>
<pre>
```
lmax.c:40:2: error: function 'bzero' is deprecated; 'memset' should be used instead [bugprone-unsafe-functions,cert-msc24-c,cert-msc33-c,-warnings-as-errors]
40 | bzero(arr_out, sizeof(arr_out[0][0]) * rows * cols);
| ^~~~~
```
It is true that bzero(3) is deprecated.
However, I can't agree with this being part of `bugprone-unsafe-functions`. It's ironic, because memset(3) is the bugprone and unsafe function. bzero(3) is a much safer thing than memset(3).
Should this diagnostic be called something else? Diagnosing deprecated stuff is significantly different from diagnosing bugprone/unsafe stuff.
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJx0U01vpDgQ_TXVlxLI2NDQBw50sq3NeX_AytgFeGTslm2SzRzy21emu5OMRoOQ_FmvXr3nkjGa2RH10JyheT7ILS0-9NLSD-l08IXy1q8yHEav33s4svvPBrvK_0oFYqgZiIGDGJBC8CFPps2pZLxD4O34k4IH3qKJqOkaSMlEGsQ5H660Rkr5NC5-sxpHwi2SRuNiIqkRmvO4zdfgHRWbi3Ki4gEegT8pCqlYo-J1ob4thdiXxZsMzrg5FjIWO7kIzTOwAWuG0D7h47tz7GQI__otAX_CaH6Sn77tNWeWg-8DPyHwAYN_i_tEeRuBn0CcM_z-5QTQ_PXx8fEBbPguHbDhJWU9UtgI0yLTJwORkX9RqrwF_O3f6JVCpvaCSjrgbUI5ByJ8M2nBtJiIIxk341WGhH5COLI_a3dkJeJLlj6iCd6ZLBiOpOQWCR--fPJJC-EDDKXTeAP8dLrE30qQuG5qwXwtZHpuzqW6X7Hv1f1zc38vQhs5Ox-TUfk1KGktaYx-pRsG2UggLojPt3t570stjGmbppw-v2szGSVdsu-ozTRRIJdwCn595Mixj6qAX-417RDlQfdCn8RJHqiv2rZmTV0xdlj6hrVto8ZW6lM3ntpaNUJWslIdVYJVrT6YnjN-ZIJXjNUdZ6XuqrpruRbdOB47raBmtEpjS2tf19KH-WBi3KivurYT7GDlSDbuHcm5stLNRTL6HTjPHRr6HFWM2xyhZtbEFL9wkkl27-VvYc3zb9Y4n77cdD7c3TxswfZLStcIYgB-AX6ZTVq2sVR-BX7Jae5DcQ3-B6kE_LJzj8Avd_qvPf8_AAD__5D0ZPI">