changeset 31361:5cc53fd090c3

build: Silence compilation warning about use of bitwise operators with boolean operands (bug #63210) * file-editor-tab.cc (file_editor_tab::run_file): Replace '|' with '||'. * mx-inlines.cc: Change DEFMXBOOLOP macro calls to use '&&' or '||'.
author Rik <rik@octave.org>
date Sat, 29 Oct 2022 17:46:50 -0700
parents bbd028c2c233
children 4e12be13186d
files libgui/src/m-editor/file-editor-tab.cc liboctave/operators/mx-inlines.cc
diffstat 2 files changed, 7 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/libgui/src/m-editor/file-editor-tab.cc	Sat Oct 29 18:37:21 2022 +0200
+++ b/libgui/src/m-editor/file-editor-tab.cc	Sat Oct 29 17:46:50 2022 -0700
@@ -1044,7 +1044,7 @@
     if (ID != this)
       return;
 
-    if (m_edit_area->isModified () | ! valid_file_name ())
+    if (m_edit_area->isModified () || ! valid_file_name ())
       {
         save_file (m_file_name);  // save file dialog
 
--- a/liboctave/operators/mx-inlines.cc	Sat Oct 29 18:37:21 2022 +0200
+++ b/liboctave/operators/mx-inlines.cc	Sat Oct 29 17:46:50 2022 -0700
@@ -213,12 +213,12 @@
       r[i] = xx OP (NOT2 logical_value (y[i]));                         \
   }
 
-DEFMXBOOLOP (mx_inline_and, , &, )
-DEFMXBOOLOP (mx_inline_or, , |, )
-DEFMXBOOLOP (mx_inline_not_and, !, &, )
-DEFMXBOOLOP (mx_inline_not_or, !, |, )
-DEFMXBOOLOP (mx_inline_and_not, , &, !)
-DEFMXBOOLOP (mx_inline_or_not, , |, !)
+DEFMXBOOLOP (mx_inline_and, , &&, )
+DEFMXBOOLOP (mx_inline_or, , ||, )
+DEFMXBOOLOP (mx_inline_not_and, !, &&, )
+DEFMXBOOLOP (mx_inline_not_or, !, ||, )
+DEFMXBOOLOP (mx_inline_and_not, , &&, !)
+DEFMXBOOLOP (mx_inline_or_not, , ||, !)
 
 template <typename X>
 inline void