Avoid loplugin:constparam when param is marked as unused
...as in entry_group_callback (sd/source/ui/remotecontrol/AvahiNetworkService.cxx), AVAHI_GCC_UNUSED void *userdata Change-Id: I494067878181c51b77d581a21ab1c9ef81e482e5
This commit is contained in:
@@ -194,7 +194,8 @@ bool ConstParams::VisitFunctionDecl(const FunctionDecl * functionDecl)
|
||||
// calculate the ones we want to check
|
||||
for (const ParmVarDecl *pParmVarDecl : compat::parameters(*functionDecl)) {
|
||||
// ignore unused params
|
||||
if (pParmVarDecl->getName().empty())
|
||||
if (pParmVarDecl->getName().empty()
|
||||
|| pParmVarDecl->hasAttr<UnusedAttr>())
|
||||
continue;
|
||||
auto const type = loplugin::TypeCheck(pParmVarDecl->getType());
|
||||
if (!type.Pointer() && !type.LvalueReference())
|
||||
|
Reference in New Issue
Block a user