eliminate potential trouble
parent
d3e8cc1833
commit
d1026167d4
|
|
@ -336,6 +336,14 @@ static int iniDoLoadItemsFromBuffer(char *content, IniContext *pContext)
|
|||
*pLastEnd = '\0';
|
||||
}
|
||||
|
||||
if (isAnnotation && pLine != pAnnoItemLine)
|
||||
{
|
||||
logWarning("file: "__FILE__", line: %d, " \
|
||||
"the @function and annotation item " \
|
||||
"must be next to each other", __LINE__);
|
||||
isAnnotation = 0;
|
||||
}
|
||||
|
||||
if (*pLine == '#' && \
|
||||
strncasecmp(pLine+1, "include", 7) == 0 && \
|
||||
(*(pLine+8) == ' ' || *(pLine+8) == '\t'))
|
||||
|
|
@ -414,14 +422,6 @@ static int iniDoLoadItemsFromBuffer(char *content, IniContext *pContext)
|
|||
continue;
|
||||
}
|
||||
|
||||
if (isAnnotation && pLine != pAnnoItemLine)
|
||||
{
|
||||
logWarning("file: "__FILE__", line: %d, " \
|
||||
"the @function and annotation item " \
|
||||
"must be next to each other", __LINE__);
|
||||
isAnnotation = 0;
|
||||
}
|
||||
|
||||
trim(pLine);
|
||||
if (*pLine == '#' || *pLine == '\0')
|
||||
{
|
||||
|
|
@ -607,6 +607,13 @@ static int iniDoLoadItemsFromBuffer(char *content, IniContext *pContext)
|
|||
pItem++;
|
||||
}
|
||||
|
||||
if (!result && isAnnotation)
|
||||
{
|
||||
logWarning("file: "__FILE__", line: %d, " \
|
||||
"the @function and annotation item " \
|
||||
"must be next to each other", __LINE__);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue