perhaps inNames should be made static?

--------------------------------------------
On Fri, 19/1/18, Ranier VF <ranier_...@hotmail.com> wrote:

 Subject: [Iup-users] CID 210519 (#1 of 1): Logically dead code (DEADCODE)
 To: "IUP discussion list." <iup-users@lists.sourceforge.net>
 Date: Friday, 19 January, 2018, 2:37
 
 Hi,
 Issue found by Coverity Scan.
 CID 210519 (#1 of 1): Logically dead
 code (DEADCODE)
 dead_error_line: Execution cannot reach
 this statement: iupArrayDestroy(inNames);
 
 ---
 a\srcmglplot\iup_mglplot.cpp    Mon Oct 17
 16:08:46 2016
 +++
 b\srcmglplot\iup_mglplot.cpp    Fri Jan 19
 00:36:40 2018
 @@ -4038,10 +4038,9 @@
  
    if (inName)
    {
 -    Iarray* inNames = NULL;
 +    Iarray* inNames;
      if (sample_index == 0)
      {
 -      if (inNames)
 iupArrayDestroy(inNames);
        inNames = 
 iupArrayCreate(10, sizeof(char*));
        iupAttribSet(ih,
 "_IUP_MGLPLOT_NAMES", (char*)inNames);
      }
 
 Best.
 
Ranier------------------------------------------------------------------------------
 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
 
 -----Inline Attachment Follows-----
 
 
 -----Inline Attachment Follows-----
 
 

------------------------------------------------------------------------------
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

Reply via email to