<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/57055>57055</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[clang-tidy] False positive: variable is not initialised with `::getpwuid`
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
H-G-Hristov
</td>
</tr>
</table>
<pre>
The following snippet:
```c++
const auto* data1 = ::getpwnam(userName.c_str());
```
produces:
variable 'data1' is not initializedC/C++[cppcoreguidelines-init-variables](https://releases.llvm.org/14.0.0/tools/clang/tools/extra/docs/clang-tidy/checks/cppcoreguidelines-init-variables.html)
Check tested with VSCode, C/C++ extension 1.11.5 on macOS Monterey.
![Screenshot 2022-08-10 at 18 49 22](https://user-images.githubusercontent.com/47526411/183952022-eb83bbeb-73c1-48f4-bc6b-c8baaf433aa3.png)
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyFU0uPmzAQ_jXmYoH8AAIHDruJ0r20PWzVa-XHBNwajLBJuv31tdlHsqtKRSPGHpuZb775kE4_dd8GwCdnrbuYqcd-MvMMAfE7RA6IvL5r8mwKsftkWxTHR7nJByzW4BC7w1oEQTHiB5wS8LsewnyZxIhYs3pYvogRCvXDhyUGEGuT8fsPJW7rzovTqwL_AU4qfBaLEdICRmy3lY0eG48nF7CZTDDCmj-g94gd9y-gq3s1z8ot0K9GgzUT-DxdzV9zeVQdIrIhhHkryY7RFrAgPPjC2vNYuKWPMVoWpCBxEZyzPnplxdTf7OF3WET02qm34zwY_ZQ2A6hfW_Q_aIohjDZx9Nb082qfEuAAPoDGFxMG_P1x7zQgtsc3_eIIAiZv3IRpQWlR4bgahfr6iD-7KcACT8W7ITMaKXpUC8SvhkgjI4zlpMkpwSJg2uCyxYz9i6M03NyMoo-g-wholSmiUpUpFMpFARzLXcXqktJEX8PbassOsuFSgsx3XNG8bE5lLlUtc9VIIU4l50LwYk7UtrdQM-hoXRNa1lVbZrrjuuWtyIIJFro05yvf1QEfhfWAZ-ejKs4QQV_F80Ew_pXQpMOrguOAYiBbF9u97_u515cGkz5eXB6F-xNUiFvj_Qpp2tWOVFU2dPrExIkzLZmqZENZ1QpZRt9IxcpWtpkVEqxPbSDGJrjgLQXamM9Ml3gjDSW0KtuKF1pLLmlDaK1F054IKgmMwtg3uWZLt0GSa-_jYWwyXLWcCe9NP8HGWsof_-TBLd1D_il_WOJVd8628t0G_y8Onkbp">