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

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

[Octave-bug-tracker] [bug #55366] Second argument to save_binary is a no


From: John W. Eaton
Subject: [Octave-bug-tracker] [bug #55366] Second argument to save_binary is a non-constant reference
Date: Thu, 3 Jan 2019 09:39:26 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0

Follow-up Comment #1, bug #55366 (project octave):

I did not look at the detailed history of this function, but it is possible
that the reference parameter was originally intended to allow information to
be passed back to the caller.  So first I changed it to use "const bool&" to
see whether there were any cases in which the argument is modified, but it is
not.  Now I see that you said that the issue was identified by the static
analysis tool, so it probably found that parameter passed by reference was
never modified.  Since this is a POD type, we should just pass it by value. 
I'm attaching a changeset.

I was working on the stable branch when I created the changeset, but it if you
would prefer to defer the change to the next major release that is also OK
with me.


(file #45853)
    _______________________________________________________

Additional Item Attachment:

File name: save-binary-diffs.txt          Size:30 KB


    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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