1 // SPDX-License-Identifier: GPL-2.0-only
2 /// Remove unneeded conversion to bool
4 //# Relational and logical operators evaluate to bool,
5 //# explicit conversion is overly verbose and unneeded.
7 // Copyright: (C) 2016 Andrew F. Davis <afd@ti.com>
14 //----------------------------------------------------------
16 //----------------------------------------------------------
42 //----------------------------------------------------------
44 //----------------------------------------------------------
71 //----------------------------------------------------------
73 //----------------------------------------------------------
75 @script:python depends on r&&org@
79 msg = "WARNING: conversion to bool not needed here"
80 coccilib.org.print_todo(p[0], msg)
82 //----------------------------------------------------------
84 //----------------------------------------------------------
86 @script:python depends on r&&report@
90 msg = "WARNING: conversion to bool not needed here"
91 coccilib.report.print_report(p[0], msg)