Message ID | d198c16f-9dcf-3238-942f-889c4322ba54@infradead.org (mailing list archive) |
---|---|
State | Mainlined, archived |
Headers | show |
On Thu, Jan 25, 2018 at 06:12:54PM -0800, Randy Dunlap wrote: > From: Randy Dunlap <rdunlap@infradead.org> > > When handling "-Wsparse-all" in handle_onoff_switch(), once all > warning flags have been set, the function can return instead of > checking for "no-" or other option names because they won't be > found. Just return NULL, which is what happens when handling > "-Wsparse-all" anyway. > > Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Acked-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com> -- To unsubscribe from this list: send the line "unsubscribe linux-sparse" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
--- sprs-2018-0119.orig/lib.c +++ sprs-2018-0119/lib.c @@ -565,6 +565,7 @@ static char **handle_onoff_switch(char * if (*warnings[i].flag != WARNING_FORCE_OFF && warnings[i].flag != &Wsparse_error) *warnings[i].flag = WARNING_ON; } + return NULL; } // Prefixes "no" and "no-" mean to turn warning off.