<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=http://email.email.llvm.org/c/eJylVMtu4zAM_Br5QtRwrbx88CFp2kWBPW3RD5AtxVajSIEeybpfv5QSN5s23csaQmKS0gxJDd0YPtQvhpQP4HthBWyl5gya0DmQGn3SQWu4ACB0CaRYk2J5_p0VpKRStypgmNAHaZy3gu0IfTztkNrDjklNygUpKyDz1ckP-MQYI_STp4ErlztK3_aA5xsEuPivkOLTMiegwAyv3YjgefTSZWuCj0niQrwyHsD0yyu604NZrec3_A3Wtv3iT8z3X5n_RXx_k_gb3tu0XGxYUP5Gxd8yj0c-cZP5-mJY4YPVf11MjM6Kq3t_ktZ5WIUuCuIVqzcbeNVSSy-Zku-Cw4GpIPA-nURhnO8w9Qkv8tkDKspoNaCs0g47FpP2RKGc6V4E7uAj06-UmtQdMH2Tb2PNLmo4SS6_Svnx9160HneuRM8O0tgI-EN4n-DgyM7ATexY-IRtJWuUcJCfsF51cIGpK6hn7OrcgQ064bwFbNBGagFYex8xO3k4ZT6MZPnf-T1vMHF2AsHqgt5qc9RxCNHkkMYRjr1MfUS_-Oid4HFyjyYoDsocBHiDlt1ih0-zm8NPgVOIc42QMJhg4SDF0Y0b8ozXlFe0YhkLmKyt9_2wsqzdCu-yYFXde793UVHlE64OKwpN3podGkodxr-7vTVv2GQ0pXNBOHyZ0ulskvV1WbSiqcSENaKazCjji6qcb-bT-5aygi1opjCiXE2mKzJdZ_9PKZGyxFXQoppWBc0LVjYlpxPGqoZP5xWZFAJlovKIkxvbZbZOkPG7h0ElnXeXIHNOdlqIMUMvvUrGw8sS7TQIeKlJNO4iSGNH9WsT1R3fmgHu7phmanhHrS8-pN8L7LhF9edZKqZOlfwBezeuLg>53564</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[CSA]: Unintialised value for switch not catch by --analyze(default checker).
</td>
</tr>
<tr>
<th>Labels</th>
<td>
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
phyBrackets
</td>
</tr>
</table>
<pre>
So, there kinda bugs in this code :
`#include <iostream>
int main() {
int a;
int b ;
switch (b)
{
case 0:
std::cout << "case0";
a=7;
break;
case 1:
std::cout << "case1";
a=7;
break;
default:
std::cout << "default";
}
return a;
}`
First Bug: Use of Uninitialized value inside switch case (It is only consider default case)
Second Bug: Returning an Uninitialized value from the main.
Expected Behavior: Getting a warning about uninitialized variables .
Unusual Behavior: It's running just fine without giving any warning.
If that's an unknown bug and a bug which can be considered, would love to work on this . Let me know your views on this.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx9VNtu4jAQ_RrnZdQodQghD3mA0q4q7dNW_QA7NsTF2MgXWPr1Ow6klJauFUE8ts85M2ccbsWxfbGEPkDopZOwUUYw4HHtQRmMKQ-dFRKAlHMgxZIU8_PvtCC0VKbTEZdJ-aCsD06yLSkfTzuUCbBlyhA6I7QBUi9OccCR1hgpv0Q4XIX8QYWuBzzPEeASv0JKo2NeQoEKr8OIEESKlvPOxpBE4oN4NB1A-fSK7jRQ1bK-EeeY2-ZbfGC-_878P-L7m8Q_8N6mFXLFog43Mv6ReTzyhZvUy8vEyRCd-WRMWp0WV74_KecDLOI6NcQrZm9X8GqUUUExrd6lgD3TUaKfXmFjnD0c6oRGPgfAjrJGH7Gthh1uTGbYkxrlTPcicYcYmf4M0pRZAzM3-VbOblMPDy2XX0l-_LuTXcCdC9mzvbIuAf6SIQxwcGBnYJ4qFr9gO8W4lh7yE9ariT4yfQX1jFWtPbhoBpy3iAVaKSMBc-8T5lrtT8qPI1n-Wd_zCoWzEwhmF83G2INJlxCnAobrCIdeDXXEuPyonRTp5h5s1AK03UsIFmdugxU-3d0cfku8hXivERKONjrYK3nw44Y8E20pmrJhWVBBy5ZUi4eXOamWg70odSiFv5TZutFTY5Nn6Y0f4e6OGaaP7-jg7MPQXnYb6dDTPItOt30IO5-akz7hs8biRJ53dosTrffj393O2Tf0C6fK-yg9vlRlNZ1kfVtQWlcNo9OGN3xVrOppM6vuJyXnjIp61mWacal9ygJTyFRL8URBi7JoqqYo84JRTkU5YazhoqobMikk9ovOE3Fu3Tpz7aAhfQBxETMP_rLIvFdrI-WIzyL669pdf1w4hqkGnw2S20HvP6h8mDM">