Powered by Linux
Re: FW: [error27/smatch] smatch misidentifies uninitialized variable after switch with no default: (Issue #3) — Semantic Matching Tool

Re: FW: [error27/smatch] smatch misidentifies uninitialized variable after switch with no default: (Issue #3)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thanks for the bug report.  The ideal way to fix this would be to handle
it in Smatch core so that if called get_implied_rl(cmd, &rl) then it
would return 0-2.

Unfortunately, that's quite a bit of work to implement it properly...

For now, I'm just going to add a special case in check_uninitialized.c
to silence these warnings.  If you have a switch(some_enum) and there is
no default statement, then mark all the partially initialized variables
as fully initialized.

regards,
dan carpenter





[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux