miniexpect
miniexpect copied to clipboard
Stricter warnings
I found a crash in virt-p2v. I started fixing that.
While looking at the global variable related to the crash (v2v_version
), I noticed that some functions shadowed this global variable with an identically named function parameter. Surprisingly I found that -Wshadow
is not enabled by either -Wall
, or even by -Wextra
. Anyways, I added -Wextra -Wshadow
to virt-p2v.
Then I found that -Wextra
caught an actual bug in the miniexpect copy in virt-p2v, and that miniexpect was a separate project.
Then I found that -Wextra
(which had proved its usefulness, see above) would not work in miniexpect unless I tweaked the code in some other places as well.
This is why software engineering is so frustrating. You want to fix ONE crash, pull on an interesting string, and the whole frickin attic comes crashing down on you. Yay!