Please sign in to comment.
Fix inlining switch statement.
In sparse, inline is replacing the function call expression with a compound statment of inline function body. During the process, all reference to the function arguments need to replaced with calling arguments. When inlining the case statement. Sparse forgets to replace the case_label->stmt to the new version. If it has inner inline function call, it will cause the orignal copy of the function definition get modified. That should never happen. It cause warning error when the inline function call the second time. With this change, validations/bug_inline_switch.c no longer generate warning. Signed-off-by: Christopher Li <firstname.lastname@example.org>
- Loading branch information...