Ticket #128: v2.13-fix-build.patch

File v2.13-fix-build.patch, 699 bytes (added by lpechacek@…, 3 years ago)

proposed fix

  • BNC_2.13.0_svn9464/newmat/newmat6.cpp

    From: Libor Pechacek <lpechacek@gmx.com>
    Date: Wed, 9 Jun 2021 16:08:03 +0200
    Subject: [PATCH] Fix build error reported by GCC 10 and later
    Patch-mainline: no, to be submitted
    
    From the context, it seems obvious that a test for nullptr
    was meant at this place.
    
    --
     newmat6.cpp |    2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    a b void CroutMatrix::operator=(const CroutM  
    428428{
    429429   if (&gm == this) { REPORT tag_val = -1; return; }
    430430   REPORT
    431    if (indx > 0) { delete [] indx; indx = 0; }
     431   if (indx) { delete [] indx; indx = 0; }
    432432   ((CroutMatrix&)gm).get_aux(*this);
    433433   Eq(gm);
    434434}