From 275dc8b967f1429cce11e155844cc2e762c2dd51 Mon Sep 17 00:00:00 2001 From: Hyunwoo Kim Date: Mon, 17 Jun 2013 14:59:15 +0900 Subject: [PATCH] Fix prevent warning Change-Id: I75e8982fd09499d305f1d8a36491ffb2928cffac Signed-off-by: Hyunwoo Kim --- ace/engine/Attribute.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/ace/engine/Attribute.cpp b/ace/engine/Attribute.cpp index 56cfc44..2471999 100644 --- a/ace/engine/Attribute.cpp +++ b/ace/engine/Attribute.cpp @@ -289,10 +289,12 @@ Attribute::parse(const std::string *input, static const char *pattern = "^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?"; pcrecpp::RE re(pattern); - re.FullMatch(input->c_str(), &val[0], &val[1], + if (!re.FullMatch(input->c_str(), &val[0], &val[1], &val[2], &val[3], &val[4], - &val[5], &val[6], &val[7], &val[8]); - + &val[5], &val[6], &val[7], &val[8])) { + LogDebug("Error: attribute parsing failed."); + return false; + } #ifdef ALL_LOGS for (int i = 0; i < 9; i++) { LogDebug("val " << i << " :" << val[i]); -- 2.7.4