octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #55347] PVS studio static analysis report


From: John W. Eaton
Subject: [Octave-bug-tracker] [bug #55347] PVS studio static analysis report
Date: Mon, 7 Jan 2019 12:54:23 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0

Follow-up Comment #42, bug #55347 (project octave):

A dynamic_cast will return nullptr for a valid pointer if you request a type
that is different from the actual type (for example).  So if the rep is an
idx_scalar_rep and you ask for idx_range_rep, it will fail.  But as you say,
it is quite unlikely that this would go unnoticed.

I spent some time trying to figure out how to avoid the switch case and the
dynamic casts, but couldn't see an easy way given the current design.  So
maybe we could do better, but probably not without a major reworking of this
set of classes.

    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?55347>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]