summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@theqtcompany.com>2016-07-01 01:44:05 +0200
committerFrederik Gladhorn <frederik.gladhorn@qt.io>2016-07-01 08:03:45 +0000
commit71ca09a07d1b5adf3eeefd3790250481781ba166 (patch)
treeddca59558bafcfb21ac532fa7557ea06c2e3d68c
parent543fbe8f24ac9b534884d47787ee6cb3aad49150 (diff)
downloadqtxmlpatterns-71ca09a07d1b5adf3eeefd3790250481781ba166.tar.gz
Fix -Werror=duplicated-cond
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 <thiago.macieira@intel.com>
-rw-r--r--src/xmlpatterns/parser/qmaintainingreader_tpl_p.h2
1 files changed, 1 insertions, 1 deletions
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<TokenLookupClass, LookupKey>::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.")