Description
Consider
void SomeClass:setDropSiteEnabled(bool enabled)
{
qCDebug(lcQpaMime) << __FUNCTION__ << window() << enabled;
if (enabled) {
causes
foo.cpp:984: warning: C4258: 'enabled' : definition from the for loop is ignored; the definition from the enclosing scope is used
since
#define qCDebug(category, ...) \ for (bool enabled = category().isDebugEnabled(); Q_UNLIKELY(enabled); enabled = false) \ QMessageLogger(__FILE__, __LINE__, Q_FUNC_INFO, category().categoryName()).debug(__VA_ARGS__)