From 71ca09a07d1b5adf3eeefd3790250481781ba166 Mon Sep 17 00:00:00 2001 From: Frederik Gladhorn Date: Fri, 1 Jul 2016 01:44:05 +0200 Subject: Fix -Werror=duplicated-cond MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This bit of error handling is actually not checking what was originally intended - doing manual pluralization of the error message. Fix it to at least compile with -Werror (gcc 6.1.1). parser/qmaintainingreader_tpl_p.h:204:26: error: duplicated ‘if’ condition [-Werror=duplicated-cond] Change-Id: Ia81ad3c8c1393d08da0a229c4625504faf56c184 Reviewed-by: Thiago Macieira --- src/xmlpatterns/parser/qmaintainingreader_tpl_p.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/xmlpatterns/parser/qmaintainingreader_tpl_p.h b/src/xmlpatterns/parser/qmaintainingreader_tpl_p.h index e2c87cd..f650f2d 100644 --- a/src/xmlpatterns/parser/qmaintainingreader_tpl_p.h +++ b/src/xmlpatterns/parser/qmaintainingreader_tpl_p.h @@ -195,7 +195,7 @@ void MaintainingReader::validateElement(const Looku formatKeyword(name()), allowed.first()); } - else if(totalCount == 1) + else if(totalCount == 2) { /* Note, allowed has already had formatKeyword() applied. */ translationString = QtXmlPatterns::tr("Attribute %1 cannot appear on the element %2. Allowed is %3, %4, and the standard attributes.") -- cgit v1.2.1