While working on orexxole.cpp with debug versions of ooRexx, sometimes (very rarely) an assertion
error popup was shown for "stricomp". It seems that sometimes one argument is not correct (probably
NULL).
Here the usages of stricmp():
if ( (pCurrBlock->memId == memId) && (pCurrBlock->invkind == invKind)
&&
(pCurrBlock->FuncVt == funcVT) && (pCurrBlock->iParmCount ==
iParmCount) &&
(pCurrBlock->iOptParms == iOptParms) && (pszFuncName != NULL)
&&
(stricmp(pCurrBlock->pszFuncName, pszFuncName) == 0) )
{
... cut ...
if ( (pCurrBlock->memId == memId) && (pCurrBlock->invkind ==
invKind) &&
(pCurrBlock->FuncVt == funcVT) && (pCurrBlock->iParmCount ==
iParmCount) &&
(pCurrBlock->iOptParms == iOptParms) && (pszFuncName != NULL)
&&
(stricmp(pCurrBlock->pszFuncName, pszFuncName) == 0) )
{
... cut ...
if ( (pCurrBlock->memId == memId) && (pszConstName != NULL) &&
(stricmp(pCurrBlock->pszConstName, pszConstName) == 0) )
{
... cut ...
if ( (pCurrBlock->memId == memId) && (pszConstName != NULL)
&&
(stricmp(pCurrBlock->pszConstName, pszConstName) == 0)
)
{
... cut ...
if (stricmp(pFuncInfo->pszFuncName, pszFunction) == 0)
{
... cut ...
if (stricmp(pConstInfo->pszConstName, pszConstName) == 0)
{
... cut ...
if
(!stricmp(pFuncInfo->pszFuncName,szBuffer))
{
... cut ...
((stricmp(pszFunction, "AT") == 0) ||
(stricmp(pszFunction, "[]") == 0)) )
{
... cut ...
if (stricmp(classID, "ARRAY") == 0)
{
... cut ...
The question is whether to ignore (only an error in assertions?) or fix it by prepending tests that
check before stricmp() whether the "argument from the structure/from the variable !=NULL &&
stricmp(...)".
---rony
_______________________________________________
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel