summaryrefslogtreecommitdiffstats
path: root/src/doxygen.cpp
diff options
context:
space:
mode:
authorDimitri van Heesch <dimitri@stack.nl>2013-09-18 20:13:40 (GMT)
committerDimitri van Heesch <dimitri@stack.nl>2013-09-18 20:13:40 (GMT)
commitb5ba77ebd72c7e994a30eda5422dffde730561ec (patch)
tree488f298f3b33e7e5b8ced572be01375d66b47c23 /src/doxygen.cpp
parent35fb02903f658f5ca6880b8ad6a5c1e6ac39d64f (diff)
downloadDoxygen-b5ba77ebd72c7e994a30eda5422dffde730561ec.zip
Doxygen-b5ba77ebd72c7e994a30eda5422dffde730561ec.tar.gz
Doxygen-b5ba77ebd72c7e994a30eda5422dffde730561ec.tar.bz2
Fixed a number of compiler warnings reported by newer clang compiler
Diffstat (limited to 'src/doxygen.cpp')
-rw-r--r--src/doxygen.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/doxygen.cpp b/src/doxygen.cpp
index dff1882..8473676 100644
--- a/src/doxygen.cpp
+++ b/src/doxygen.cpp
@@ -2787,10 +2787,13 @@ static void addVariable(EntryNav *rootNav,int isFuncPtr=-1)
root->type=root->name;
static const QRegExp reName("[a-z_A-Z][a-z_A-Z0-9]*");
- int l;
+ int l=0;
int i=root->args.isEmpty() ? -1 : reName.match(root->args,0,&l);
- root->name=root->args.mid(i,l);
- root->args=root->args.mid(i+l,root->args.find(')',i+l)-i-l);
+ if (i!=-1)
+ {
+ root->name=root->args.mid(i,l);
+ root->args=root->args.mid(i+l,root->args.find(')',i+l)-i-l);
+ }
//printf("new: type=`%s' name=`%s' args=`%s'\n",
// root->type.data(),root->name.data(),root->args.data());
}