Hi, Issue found by Coverity Scan. CID 210629 (#1 of 1): Argument cannot be negative (NEGATIVE_RETURNS) return_negative_constant: Explicitly returning negative value -1.
iup_childtree.c, function IupGetChildCount: --- a\src\iup_childtree.c Tue May 02 23:06:40 2017 +++ b\src\iup_childtree.c Fri Jan 19 00:10:02 2018 @@ -440,7 +440,7 @@ iupASSERT(iupObjectCheck(ih)); if (!iupObjectCheck(ih)) - return -1; + return 0; for (child = ih->firstchild; child; child = child->brother) count++; This fixes iFlatTabsCheckVisibleTab function in iup_flattabs.c at line 159, where call function calloc: CID 210629 (#1 of 1): Argument cannot be negative (NEGATIVE_RETURNS) negative_returns: count is passed to a parameter that cannot be negative. visible_width = calloc(count, sizeof(int)); Best. Ranier
iup_chieldtree.patch
Description: iup_chieldtree.patch
------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________ Iup-users mailing list Iup-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/iup-users