Messages in this thread | | | Subject | Re: alpha: Checking source code positions for the setting of error codes | From | SF Markus Elfring <> | Date | Wed, 18 Jan 2017 16:41:10 +0100 |
| |
>> A local variable was set to an error code in two cases before a concrete >> error situation was detected. Thus move the corresponding assignment into >> an if branch to indicate a software failure there. >> >> This issue was detected by using the Coccinelle software. > > Why the hell is that an issue?
* Can misplaced variable assignments result in unwanted run time consequences because of the previous approach for a control flow specification?
* How do you think about to achieve that error codes will only be set after a specific software failure was detected?
> It's a common enough idiom,
Are corresponding implementation details worth for another look?
> and while these functions are far from being hot paths, > blind patches like that are very much to be discouraged. NAK.
Thanks for your feedback.
Regards, Markus
| |