On Sun, Mar 05, 2017 at 10:49:37PM +0800, Christopher Li wrote: > This can be written as: > > int has_init = !is_typedef && match_op(token, '='); > if (has_init) { Yes, it can. But honestly I absolutely detest this 'has_init'. > .... > > Passing the "has_init" into a call back function make the code hard to > read because the logic has separated into two function. At the same time > process_for_loop_decl does not issue this warning at all, I think it should. Since I just realize that this 'has_init' is not needed as we can simply test the presence of decl->initializer, I'll remove it. > I will apply this patch for sparse-next, I agree the warning is useful > behavior. I am also expecting a follow up patch. Yes. Don't bother to add it to sparse-next, I'll send another version later. Luc -- To unsubscribe from this list: send the line "unsubscribe linux-sparse" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html