changeset 29966:7d9be634ac91

declare extra functions in .oct file sources as static * __glpk__.cc (glpk): Declare static. * __init_fltk__.cc (script_cb): Declare static. * __ode15__.cc (ida_user_function, ida_dense_jac, ida_sparse_jac, * ida_dense_cell_jac, ida_sparsffe_cell_jac, do_ode15): Declare static. * audiodevinfo.cc (bits_to_format): Declare static.
author John W. Eaton <jwe@octave.org>
date Sun, 15 Aug 2021 15:00:49 -0400
parents 96eb9a6f868b
children da1678140f7e
files libinterp/dldfcn/__glpk__.cc libinterp/dldfcn/__init_fltk__.cc libinterp/dldfcn/__ode15__.cc libinterp/dldfcn/audiodevinfo.cc
diffstat 4 files changed, 9 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/libinterp/dldfcn/__glpk__.cc	Sun Aug 15 15:56:43 2021 +0200
+++ b/libinterp/dldfcn/__glpk__.cc	Sun Aug 15 15:00:49 2021 -0400
@@ -78,7 +78,7 @@
   double tolobj;
 };
 
-int
+static int
 glpk (int sense, int n, int m, double *c, int nz, int *rn, int *cn,
       double *a, double *b, char *ctype, int *freeLB, double *lb,
       int *freeUB, double *ub, int *vartype, int isMIP, int lpsolver,
--- a/libinterp/dldfcn/__init_fltk__.cc	Sun Aug 15 15:56:43 2021 +0200
+++ b/libinterp/dldfcn/__init_fltk__.cc	Sun Aug 15 15:00:49 2021 -0400
@@ -291,7 +291,7 @@
   }
 };
 
-void script_cb (Fl_Widget *, void *data)
+static void script_cb (Fl_Widget *, void *data)
 {
   static_cast<uimenu::properties *> (data)->execute_callback ();
 }
--- a/libinterp/dldfcn/__ode15__.cc	Sun Aug 15 15:56:43 2021 +0200
+++ b/libinterp/dldfcn/__ode15__.cc	Sun Aug 15 15:00:49 2021 -0400
@@ -1031,7 +1031,7 @@
     // octave_stdout << " solutions of linear systems\n";
   }
 
-  ColumnVector
+  static ColumnVector
   ida_user_function (const ColumnVector& x, const ColumnVector& xdot,
                      double t, const octave_value& ida_fc)
   {
@@ -1049,7 +1049,7 @@
     return tmp(0).vector_value ();
   }
 
-  Matrix
+  static Matrix
   ida_dense_jac (const ColumnVector& x, const ColumnVector& xdot,
                  double t, double cj, const octave_value& ida_jc)
   {
@@ -1067,7 +1067,7 @@
     return tmp(0).matrix_value () + cj * tmp(1).matrix_value ();
   }
 
-  SparseMatrix
+  static SparseMatrix
   ida_sparse_jac (const ColumnVector& x, const ColumnVector& xdot,
                   double t, double cj, const octave_value& ida_jc)
   {
@@ -1085,20 +1085,20 @@
     return tmp(0).sparse_matrix_value () + cj * tmp(1).sparse_matrix_value ();
   }
 
-  Matrix
+  static Matrix
   ida_dense_cell_jac (Matrix *dfdy, Matrix *dfdyp, double cj)
   {
     return (*dfdy) + cj * (*dfdyp);
   }
 
-  SparseMatrix
+  static SparseMatrix
   ida_sparse_cell_jac (SparseMatrix *spdfdy, SparseMatrix *spdfdyp,
                        double cj)
   {
     return (*spdfdy) + cj * (*spdfdyp);
   }
 
-  octave_value_list
+  static octave_value_list
   do_ode15 (const octave_value& ida_fcn,
             const ColumnVector& tspan,
             const octave_idx_type numt,
--- a/libinterp/dldfcn/audiodevinfo.cc	Sun Aug 15 15:56:43 2021 +0200
+++ b/libinterp/dldfcn/audiodevinfo.cc	Sun Aug 15 15:00:49 2021 -0400
@@ -59,7 +59,7 @@
 
 #if defined (HAVE_PORTAUDIO)
 
-PaSampleFormat
+static PaSampleFormat
 bits_to_format (int bits)
 {
   if (bits == 8)