# HG changeset patch # User John W. Eaton # Date 1215813568 14400 # Node ID 4976f66d469b51185e96b2df7f1f48eefb602331 # Parent c3d21b9b94b679db93ba863f721171f36b74f248 miscellaneous cleanup diff -r c3d21b9b94b6 -r 4976f66d469b liboctave/Array-d.cc --- a/liboctave/Array-d.cc Fri Jul 11 15:43:10 2008 -0400 +++ b/liboctave/Array-d.cc Fri Jul 11 17:59:28 2008 -0400 @@ -139,7 +139,8 @@ { octave_idx_type i = 0; double *vtmp = reinterpret_cast (p); - while (xisnan (vtmp[i++]) && i < ns); + while (xisnan (vtmp[i++]) && i < ns) + /* do nothing */; for (octave_idx_type l = 0; l < ns - i + 1; l++) vtmp[l] = vtmp[l+i-1]; for (octave_idx_type l = ns - i + 1; l < ns; l++) @@ -149,7 +150,8 @@ { octave_idx_type i = ns; double *vtmp = reinterpret_cast (p); - while (xisnan (vtmp[--i]) && i > 0); + while (xisnan (vtmp[--i]) && i > 0) + /* do nothing */; for (octave_idx_type l = i; l >= 0; l--) vtmp[l-i+ns-1] = vtmp[l]; for (octave_idx_type l = 0; l < ns - i - 1; l++) @@ -199,7 +201,8 @@ if (mode == ASCENDING) { octave_idx_type i = 0; - while (xisnan (v[i++*stride + offset]) && i < ns); + while (xisnan (v[i++*stride + offset]) && i < ns) + /* do nothing */; for (octave_idx_type l = 0; l < ns - i + 1; l++) v[l*stride + offset] = v[(l+i-1)*stride + offset]; for (octave_idx_type l = ns - i + 1; l < ns; l++) @@ -208,7 +211,8 @@ else { octave_idx_type i = ns; - while (xisnan (v[--i*stride + offset]) && i > 0); + while (xisnan (v[--i*stride + offset]) && i > 0) + /* do nothing */; for (octave_idx_type l = i; l >= 0; l--) v[(l-i+ns-1)*stride + offset] = v[l*stride + offset]; for (octave_idx_type l = 0; l < ns - i - 1; l++) @@ -303,7 +307,8 @@ if (mode == ASCENDING) { octave_idx_type i = 0; - while (xisnan (v[i++*stride+offset]) && i < ns); + while (xisnan (v[i++*stride+offset]) && i < ns) + /* do nothing */; OCTAVE_LOCAL_BUFFER (double, itmp, i - 1); for (octave_idx_type l = 0; l < i -1; l++) itmp[l] = sidx(l*stride + offset); @@ -322,7 +327,8 @@ else { octave_idx_type i = ns; - while (xisnan (v[--i*stride+offset]) && i > 0); + while (xisnan (v[--i*stride+offset]) && i > 0) + /* do nothing */; OCTAVE_LOCAL_BUFFER (double, itmp, ns - i - 1); for (octave_idx_type l = 0; l < ns - i -1; l++) itmp[l] = sidx((l+i+1)*stride + offset); diff -r c3d21b9b94b6 -r 4976f66d469b liboctave/Array-f.cc --- a/liboctave/Array-f.cc Fri Jul 11 15:43:10 2008 -0400 +++ b/liboctave/Array-f.cc Fri Jul 11 17:59:28 2008 -0400 @@ -139,7 +139,8 @@ { octave_idx_type i = 0; float *vtmp = reinterpret_cast (p); - while (xisnan (vtmp[i++]) && i < ns); + while (xisnan (vtmp[i++]) && i < ns) + /* do nothing */; for (octave_idx_type l = 0; l < ns - i + 1; l++) vtmp[l] = vtmp[l+i-1]; for (octave_idx_type l = ns - i + 1; l < ns; l++) @@ -149,7 +150,8 @@ { octave_idx_type i = ns; float *vtmp = reinterpret_cast (p); - while (xisnan (vtmp[--i]) && i > 0); + while (xisnan (vtmp[--i]) && i > 0) + /* do nothing */; for (octave_idx_type l = i; l >= 0; l--) vtmp[l-i+ns-1] = vtmp[l]; for (octave_idx_type l = 0; l < ns - i - 1; l++) @@ -199,7 +201,8 @@ if (mode == ASCENDING) { octave_idx_type i = 0; - while (xisnan (v[i++*stride + offset]) && i < ns); + while (xisnan (v[i++*stride + offset]) && i < ns) + /* do nothing */; for (octave_idx_type l = 0; l < ns - i + 1; l++) v[l*stride + offset] = v[(l+i-1)*stride + offset]; for (octave_idx_type l = ns - i + 1; l < ns; l++) @@ -208,7 +211,8 @@ else { octave_idx_type i = ns; - while (xisnan (v[--i*stride + offset]) && i > 0); + while (xisnan (v[--i*stride + offset]) && i > 0) + /* do nothing */; for (octave_idx_type l = i; l >= 0; l--) v[(l-i+ns-1)*stride + offset] = v[l*stride + offset]; for (octave_idx_type l = 0; l < ns - i - 1; l++) @@ -303,7 +307,8 @@ if (mode == ASCENDING) { octave_idx_type i = 0; - while (xisnan (v[i++*stride+offset]) && i < ns); + while (xisnan (v[i++*stride+offset]) && i < ns) + /* do nothing */; OCTAVE_LOCAL_BUFFER (float, itmp, i - 1); for (octave_idx_type l = 0; l < i -1; l++) itmp[l] = sidx(l*stride + offset); @@ -322,7 +327,8 @@ else { octave_idx_type i = ns; - while (xisnan (v[--i*stride+offset]) && i > 0); + while (xisnan (v[--i*stride+offset]) && i > 0) + /* do nothing */; OCTAVE_LOCAL_BUFFER (float, itmp, ns - i - 1); for (octave_idx_type l = 0; l < ns - i -1; l++) itmp[l] = sidx((l+i+1)*stride + offset); diff -r c3d21b9b94b6 -r 4976f66d469b liboctave/Array-util.cc --- a/liboctave/Array-util.cc Fri Jul 11 15:43:10 2008 -0400 +++ b/liboctave/Array-util.cc Fri Jul 11 17:59:28 2008 -0400 @@ -139,7 +139,6 @@ { int m = 0; int n = dim.length (); - bool retval = true; if (n == 0) m = 2; @@ -151,6 +150,7 @@ else if (dim(i) < 1) m += 2; } + return (m < 2); } diff -r c3d21b9b94b6 -r 4976f66d469b liboctave/ChangeLog --- a/liboctave/ChangeLog Fri Jul 11 15:43:10 2008 -0400 +++ b/liboctave/ChangeLog Fri Jul 11 17:59:28 2008 -0400 @@ -1,5 +1,24 @@ 2008-07-11 John W. Eaton + * dDiagMatrix.cc (DiagMatrix::diag): Return empty ColumnVector if + number of rows or columns is 0. + * fDiagMatrix.cc (FloatDiagMatrix::diag): Likewise. + + * Array-util.cc (is_vector): Avoid GCC warning. + * Array-f.cc (Array::sort): Likewise. + * Array-d.cc (Array::sort): Likewise. + * dbleQR.cc (QR::QR (const Matrix&, const Matrix&)): Likewise. + * CmplxQR.cc (ComplexQR::ComplexQR (const ComplexMatrix&, const + ComplexMatrix&)): Likewise. + * floatQR.cc (FloatQR::FloatQR (const FloatMatrix&, const + FloatMatrix&)): Likewise. + * fCmplxQR.cc (FloatComplexQR::FloatComplexQR (const + FloatComplexMatrix&, const FloatComplexMatrix&)): Likewise. + * Quad.cc (IndefQuad::do_integrate (octave_idx_type&, + octave_idx_type&, float&), FloatIndefQuad::do_integrate, + DefQuad::do_integrate octave_idx_type&, octave_idx_type&, float&, + FloatIndefQuad::do_integrate): Likewise. + * mx-op-defs.h (MS_BOOL_OP, SM_BOOL_OP, MM_BOOL_OP, NDS_BOOL_OP, SND_BOOL_OP, NDND_BOOL_OP): Detect NaN values. * Array-util.cc (gripe_nan_to_logical_conversion): New function. diff -r c3d21b9b94b6 -r 4976f66d469b liboctave/CmplxQR.cc --- a/liboctave/CmplxQR.cc Fri Jul 11 15:43:10 2008 -0400 +++ b/liboctave/CmplxQR.cc Fri Jul 11 17:59:28 2008 -0400 @@ -159,16 +159,16 @@ } } -ComplexQR::ComplexQR (const ComplexMatrix &q, const ComplexMatrix& r) +ComplexQR::ComplexQR (const ComplexMatrix& q_arg, const ComplexMatrix& r_arg) { - if (q.columns () != r.rows ()) + if (q_arg.columns () != r_arg.rows ()) { (*current_liboctave_error_handler) ("QR dimensions mismatch"); return; } - this->q = q; - this->r = r; + this->q = q_arg; + this->r = r_arg; } void diff -r c3d21b9b94b6 -r 4976f66d469b liboctave/Quad.cc --- a/liboctave/Quad.cc Fri Jul 11 15:43:10 2008 -0400 +++ b/liboctave/Quad.cc Fri Jul 11 17:59:28 2008 -0400 @@ -160,7 +160,7 @@ } float -DefQuad::do_integrate (octave_idx_type& ier, octave_idx_type& neval, float& abserr) +DefQuad::do_integrate (octave_idx_type&, octave_idx_type&, float&) { (*current_liboctave_error_handler) ("incorrect integration function called"); return 0.0; @@ -213,14 +213,14 @@ } float -IndefQuad::do_integrate (octave_idx_type& ier, octave_idx_type& neval, float& abserr) +IndefQuad::do_integrate (octave_idx_type&, octave_idx_type&, float&) { (*current_liboctave_error_handler) ("incorrect integration function called"); return 0.0; } double -FloatDefQuad::do_integrate (octave_idx_type& ier, octave_idx_type& neval, double& abserr) +FloatDefQuad::do_integrate (octave_idx_type&, octave_idx_type&, double&) { (*current_liboctave_error_handler) ("incorrect integration function called"); return 0.0; @@ -256,7 +256,7 @@ } double -FloatIndefQuad::do_integrate (octave_idx_type& ier, octave_idx_type& neval, double& abserr) +FloatIndefQuad::do_integrate (octave_idx_type&, octave_idx_type&, double&) { (*current_liboctave_error_handler) ("incorrect integration function called"); return 0.0; diff -r c3d21b9b94b6 -r 4976f66d469b liboctave/dDiagMatrix.cc --- a/liboctave/dDiagMatrix.cc Fri Jul 11 15:43:10 2008 -0400 +++ b/liboctave/dDiagMatrix.cc Fri Jul 11 17:59:28 2008 -0400 @@ -343,18 +343,19 @@ ColumnVector DiagMatrix::diag (octave_idx_type k) const { + ColumnVector d; + octave_idx_type nnr = rows (); octave_idx_type nnc = cols (); - if (nnr == 0 || nnc == 0) + if (nnr == 0 || nnc == 0) + return d; if (k > 0) nnc -= k; else if (k < 0) nnr += k; - ColumnVector d; - if (nnr > 0 && nnc > 0) { octave_idx_type ndiag = (nnr < nnc) ? nnr : nnc; diff -r c3d21b9b94b6 -r 4976f66d469b liboctave/dbleQR.cc --- a/liboctave/dbleQR.cc Fri Jul 11 15:43:10 2008 -0400 +++ b/liboctave/dbleQR.cc Fri Jul 11 17:59:28 2008 -0400 @@ -148,16 +148,16 @@ } } -QR::QR (const Matrix& q, const Matrix& r) +QR::QR (const Matrix& q_arg, const Matrix& r_arg) { - if (q.columns () != r.rows ()) + if (q_arg.columns () != r_arg.rows ()) { (*current_liboctave_error_handler) ("QR dimensions mismatch"); return; } - this->q = q; - this->r = r; + this->q = q_arg; + this->r = r_arg; } void diff -r c3d21b9b94b6 -r 4976f66d469b liboctave/fCmplxQR.cc --- a/liboctave/fCmplxQR.cc Fri Jul 11 15:43:10 2008 -0400 +++ b/liboctave/fCmplxQR.cc Fri Jul 11 17:59:28 2008 -0400 @@ -159,16 +159,16 @@ } } -FloatComplexQR::FloatComplexQR (const FloatComplexMatrix &q, const FloatComplexMatrix& r) +FloatComplexQR::FloatComplexQR (const FloatComplexMatrix& q_arg, const FloatComplexMatrix& r_arg) { - if (q.columns () != r.rows ()) + if (q_arg.columns () != r_arg.rows ()) { (*current_liboctave_error_handler) ("QR dimensions mismatch"); return; } - this->q = q; - this->r = r; + this->q = q_arg; + this->r = r_arg; } void diff -r c3d21b9b94b6 -r 4976f66d469b liboctave/fDiagMatrix.cc --- a/liboctave/fDiagMatrix.cc Fri Jul 11 15:43:10 2008 -0400 +++ b/liboctave/fDiagMatrix.cc Fri Jul 11 17:59:28 2008 -0400 @@ -343,18 +343,19 @@ FloatColumnVector FloatDiagMatrix::diag (octave_idx_type k) const { + FloatColumnVector d; + octave_idx_type nnr = rows (); octave_idx_type nnc = cols (); if (nnr == 0 || nnc == 0) + return d; if (k > 0) nnc -= k; else if (k < 0) nnr += k; - FloatColumnVector d; - if (nnr > 0 && nnc > 0) { octave_idx_type ndiag = (nnr < nnc) ? nnr : nnc; diff -r c3d21b9b94b6 -r 4976f66d469b liboctave/floatQR.cc --- a/liboctave/floatQR.cc Fri Jul 11 15:43:10 2008 -0400 +++ b/liboctave/floatQR.cc Fri Jul 11 17:59:28 2008 -0400 @@ -148,16 +148,16 @@ } } -FloatQR::FloatQR (const FloatMatrix& q, const FloatMatrix& r) +FloatQR::FloatQR (const FloatMatrix& q_arg, const FloatMatrix& r_arg) { - if (q.columns () != r.rows ()) + if (q_arg.columns () != r_arg.rows ()) { (*current_liboctave_error_handler) ("QR dimensions mismatch"); return; } - this->q = q; - this->r = r; + this->q = q_arg; + this->r = r_arg; } void diff -r c3d21b9b94b6 -r 4976f66d469b src/ChangeLog --- a/src/ChangeLog Fri Jul 11 15:43:10 2008 -0400 +++ b/src/ChangeLog Fri Jul 11 17:59:28 2008 -0400 @@ -1,5 +1,30 @@ 2008-07-11 John W. Eaton + * syscalls.cc (const_value): Delete arg NM. Change all uses. + + * DLD-FUNCTIONS/fft.cc (do_fft): Avoid GCC warning. + * DLD-FUNCTIONS/fft2.cc (do_fft2): Likewise. + * DLD-FUNCTIONS/fftn.cc (do_fftn): Likewise. + * DLD-FUNCTIONS/qr.cc (Fqrshift): Likewise. + * DLD-FUNCTIONS/lookup.cc (Flookup): Likewise. + * gl-render.cc (opengl_renderer::draw): Likewise. + * graphics.cc (axes::update_axis_limits, + hggroup::update_axis_limits, Favailable_backends): + Likewise. + * pt-cmd.cc (tree_no_op_command::dup, tree_function_def::dup): + Likewise. + * pt-const.cc (tree_constant::dup): Likewise. + * pt-id.cc (tree_identifier::dup): Likewise. + * pt-jump.cc (tree_break_command::dup, tree_continue_command::dup, + tree_return_command::dup): Likewise. + + * DLD-FUNCTIONS/colamd.cc: Style fixes. + (tree_postorder): Rename from TreePostorder. + (tree_postorder, coletree): Avoid GCC warnings. + + * DLD-FUNCTIONS/chol.cc (Fchol): Avoid GCC warnings. + (Fcholdelete, Fcholshift): Delete unused arg nargout. + * toplev.cc, toplev.h (octave_call_stack::caller_user_function, octave_call_stack::caller_user_script, octave_call_stack::do_caller_user_function, diff -r c3d21b9b94b6 -r 4976f66d469b src/DLD-FUNCTIONS/chol.cc --- a/src/DLD-FUNCTIONS/chol.cc Fri Jul 11 15:43:10 2008 -0400 +++ b/src/DLD-FUNCTIONS/chol.cc Fri Jul 11 17:59:28 2008 -0400 @@ -181,10 +181,12 @@ octave_idx_type info; SparseCHOL fact (m, info, natural); if (nargout == 3) - if (vecout) - retval(2) = fact.perm (); - else - retval(2) = fact.Q(); + { + if (vecout) + retval(2) = fact.perm (); + else + retval(2) = fact.Q(); + } if (nargout > 1 || info == 0) { @@ -208,10 +210,12 @@ SparseComplexCHOL fact (m, info, natural); if (nargout == 3) - if (vecout) - retval(2) = fact.perm (); - else - retval(2) = fact.Q(); + { + if (vecout) + retval(2) = fact.perm (); + else + retval(2) = fact.Q(); + } if (nargout > 1 || info == 0) { @@ -984,7 +988,7 @@ %! */ -DEFUN_DLD (choldelete, args, nargout, +DEFUN_DLD (choldelete, args, , "-*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{R1} =} choldelete (@var{R}, @var{j})\n\ Given a Cholesky@tie{}factorization of a real symmetric or complex hermitian\n\ @@ -1116,7 +1120,7 @@ %! assert(norm(R1'*R1 - single(Ac(p,p)),Inf) < 1e1*eps('single')) */ -DEFUN_DLD (cholshift, args, nargout, +DEFUN_DLD (cholshift, args, , "-*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{R1} =} cholshift (@var{R}, @var{i}, @var{j})\n\ Given a Cholesky@tie{}factorization of a real symmetric or complex hermitian\n\ diff -r c3d21b9b94b6 -r 4976f66d469b src/DLD-FUNCTIONS/colamd.cc --- a/src/DLD-FUNCTIONS/colamd.cc Fri Jul 11 15:43:10 2008 -0400 +++ b/src/DLD-FUNCTIONS/colamd.cc Fri Jul 11 17:59:28 2008 -0400 @@ -53,9 +53,9 @@ // The symmetric column elimination tree code take from the Davis LDL code. // Copyright given elsewhere in this file. -static -void symetree (const octave_idx_type *ridx, const octave_idx_type *cidx, - octave_idx_type *Parent, octave_idx_type *P, octave_idx_type n) +static void +symetree (const octave_idx_type *ridx, const octave_idx_type *cidx, + octave_idx_type *Parent, octave_idx_type *P, octave_idx_type n) { OCTAVE_LOCAL_BUFFER (octave_idx_type, Flag, n); OCTAVE_LOCAL_BUFFER (octave_idx_type, Pinv, (P ? n : 0)); @@ -91,58 +91,64 @@ } // The elimination tree post-ordering code below is taken from SuperLU -static inline -octave_idx_type make_set (octave_idx_type i, octave_idx_type *pp) +static inline octave_idx_type +make_set (octave_idx_type i, octave_idx_type *pp) { pp[i] = i; return i; } -static inline -octave_idx_type link (octave_idx_type s, octave_idx_type t, octave_idx_type *pp) +static inline octave_idx_type +link (octave_idx_type s, octave_idx_type t, octave_idx_type *pp) { pp[s] = t; return t; } -static inline -octave_idx_type find (octave_idx_type i, octave_idx_type *pp) +static inline octave_idx_type +find (octave_idx_type i, octave_idx_type *pp) { register octave_idx_type p, gp; p = pp[i]; gp = pp[p]; - while (gp != p) { - pp[i] = gp; - i = gp; - p = pp[i]; - gp = pp[p]; - } - return (p); + + while (gp != p) + { + pp[i] = gp; + i = gp; + p = pp[i]; + gp = pp[p]; + } + + return p; } -static -octave_idx_type etdfs (octave_idx_type v, octave_idx_type *first_kid, - octave_idx_type *next_kid, octave_idx_type *post, - octave_idx_type postnum) +static octave_idx_type +etdfs (octave_idx_type v, octave_idx_type *first_kid, + octave_idx_type *next_kid, octave_idx_type *post, + octave_idx_type postnum) { - for (octave_idx_type w = first_kid[v]; w != -1; w = next_kid[w]) { + for (octave_idx_type w = first_kid[v]; w != -1; w = next_kid[w]) postnum = etdfs (w, first_kid, next_kid, post, postnum); - } + post[postnum++] = v; return postnum; } -static -void TreePostorder(octave_idx_type n, octave_idx_type *parent, octave_idx_type *post) +static void +tree_postorder (octave_idx_type n, octave_idx_type *parent, + octave_idx_type *post) { // Allocate storage for working arrays and results OCTAVE_LOCAL_BUFFER (octave_idx_type, first_kid, n+1); OCTAVE_LOCAL_BUFFER (octave_idx_type, next_kid, n+1); // Set up structure describing children - for (octave_idx_type v = 0; v <= n; first_kid[v++] = -1); + for (octave_idx_type v = 0; v <= n; first_kid[v++] = -1) + /* do nothing */; + for (octave_idx_type v = n-1; v >= 0; v--) { octave_idx_type dad = parent[v]; @@ -154,17 +160,19 @@ etdfs (n, first_kid, next_kid, post, 0); } -static -void coletree (const octave_idx_type *ridx, const octave_idx_type *colbeg, - octave_idx_type *colend, octave_idx_type *parent, - octave_idx_type nr, octave_idx_type nc) +static void +coletree (const octave_idx_type *ridx, const octave_idx_type *colbeg, + octave_idx_type *colend, octave_idx_type *parent, + octave_idx_type nr, octave_idx_type nc) { OCTAVE_LOCAL_BUFFER (octave_idx_type, root, nc); OCTAVE_LOCAL_BUFFER (octave_idx_type, pp, nc); OCTAVE_LOCAL_BUFFER (octave_idx_type, firstcol, nr); // Compute firstcol[row] = first nonzero column in row - for (octave_idx_type row = 0; row < nr; firstcol[row++] = nc); + for (octave_idx_type row = 0; row < nr; firstcol[row++] = nc) + /* do nothing */; + for (octave_idx_type col = 0; col < nc; col++) for (octave_idx_type p = colbeg[col]; p < colend[col]; p++) { @@ -400,14 +408,14 @@ coletree (ridx, colbeg, colend, etree, n_row, n_col); // Calculate the tree post-ordering - TreePostorder (n_col, etree, colbeg); + tree_postorder (n_col, etree, colbeg); // return the permutation vector NDArray out_perm (dim_vector (1, n_col)); for (octave_idx_type i = 0; i < n_col; i++) out_perm(i) = p [colbeg [i]] + 1; - retval (0) = out_perm; + retval(0) = out_perm; // print stats if spumoni > 0 if (spumoni > 0) @@ -597,14 +605,14 @@ // Calculate the tree post-ordering OCTAVE_LOCAL_BUFFER (octave_idx_type, post, n_col + 1); - TreePostorder (n_col, etree, post); + tree_postorder (n_col, etree, post); // return the permutation vector NDArray out_perm (dim_vector (1, n_col)); for (octave_idx_type i = 0; i < n_col; i++) out_perm(i) = perm [post [i]] + 1; - retval (0) = out_perm; + retval(0) = out_perm; // print stats if spumoni > 0 if (spumoni > 0) @@ -707,9 +715,9 @@ return retval; } } + // column elimination tree post-ordering (reuse variables) OCTAVE_LOCAL_BUFFER (octave_idx_type, etree, n_col + 1); - if (is_sym) { @@ -718,6 +726,7 @@ error ("etree: matrix is marked as symmetric, but not square"); return retval; } + symetree (ridx, cidx, etree, 0, n_col); } else @@ -739,23 +748,23 @@ // We flag a root with n_col while Matlab does it with zero // Convert for matlab compatiable output if (etree[i] == n_col) - tree (i) = 0; + tree(i) = 0; else - tree (i) = etree[i] + 1; + tree(i) = etree[i] + 1; - retval (0) = tree; + retval(0) = tree; if (nargout == 2) { // Calculate the tree post-ordering OCTAVE_LOCAL_BUFFER (octave_idx_type, post, n_col + 1); - TreePostorder (n_col, etree, post); + tree_postorder (n_col, etree, post); NDArray postorder (dim_vector (1, n_col)); for (octave_idx_type i = 0; i < n_col; i++) - postorder (i) = post[i] + 1; + postorder(i) = post[i] + 1; - retval (1) = postorder; + retval(1) = postorder; } } diff -r c3d21b9b94b6 -r 4976f66d469b src/DLD-FUNCTIONS/fft.cc --- a/src/DLD-FUNCTIONS/fft.cc Fri Jul 11 15:43:10 2008 -0400 +++ b/src/DLD-FUNCTIONS/fft.cc Fri Jul 11 17:59:28 2008 -0400 @@ -115,10 +115,12 @@ dims (dim) = n_points; if (dims.any_zero () || n_points == 0) - if (arg.is_single_type ()) - return octave_value (FloatNDArray (dims)); - else - return octave_value (NDArray (dims)); + { + if (arg.is_single_type ()) + return octave_value (FloatNDArray (dims)); + else + return octave_value (NDArray (dims)); + } if (arg.is_single_type ()) { diff -r c3d21b9b94b6 -r 4976f66d469b src/DLD-FUNCTIONS/fft2.cc --- a/src/DLD-FUNCTIONS/fft2.cc Fri Jul 11 15:43:10 2008 -0400 +++ b/src/DLD-FUNCTIONS/fft2.cc Fri Jul 11 17:59:28 2008 -0400 @@ -106,10 +106,12 @@ dims (1) = n_cols; if (dims.all_zero () || n_rows == 0 || n_cols == 0) - if (arg.is_single_type ()) - return octave_value (FloatMatrix ()); - else - return octave_value (Matrix ()); + { + if (arg.is_single_type ()) + return octave_value (FloatMatrix ()); + else + return octave_value (Matrix ()); + } if (arg.is_single_type ()) { diff -r c3d21b9b94b6 -r 4976f66d469b src/DLD-FUNCTIONS/fftn.cc --- a/src/DLD-FUNCTIONS/fftn.cc Fri Jul 11 15:43:10 2008 -0400 +++ b/src/DLD-FUNCTIONS/fftn.cc Fri Jul 11 17:59:28 2008 -0400 @@ -88,10 +88,12 @@ return retval; if (dims.all_zero ()) - if (arg.is_single_type ()) - return octave_value (FloatMatrix ()); - else - return octave_value (Matrix ()); + { + if (arg.is_single_type ()) + return octave_value (FloatMatrix ()); + else + return octave_value (Matrix ()); + } if (arg.is_single_type ()) { diff -r c3d21b9b94b6 -r 4976f66d469b src/DLD-FUNCTIONS/lookup.cc --- a/src/DLD-FUNCTIONS/lookup.cc Fri Jul 11 15:43:10 2008 -0400 +++ b/src/DLD-FUNCTIONS/lookup.cc Fri Jul 11 17:59:28 2008 -0400 @@ -228,7 +228,7 @@ bool (*ov_str_comp) (const octave_value&, const octave_value&); - bool icase = false, desc; + bool icase = false; // check for case-insensitive option if (nargin == 3) diff -r c3d21b9b94b6 -r 4976f66d469b src/DLD-FUNCTIONS/qr.cc --- a/src/DLD-FUNCTIONS/qr.cc Fri Jul 11 15:43:10 2008 -0400 +++ b/src/DLD-FUNCTIONS/qr.cc Fri Jul 11 17:59:28 2008 -0400 @@ -1429,7 +1429,6 @@ if (argq.is_matrix_type () && argr.is_matrix_type () && argi.is_real_scalar () && argj.is_real_scalar ()) { - octave_idx_type m = argq.rows (); octave_idx_type n = argr.columns (); octave_idx_type k = argq.columns (); diff -r c3d21b9b94b6 -r 4976f66d469b src/gl-render.cc --- a/src/gl-render.cc Fri Jul 11 15:43:10 2008 -0400 +++ b/src/gl-render.cc Fri Jul 11 17:59:28 2008 -0400 @@ -2298,7 +2298,7 @@ has_facealpha = ((a.numel () > 0) && (a.rows () == f.rows ())); } - octave_idx_type fr = f.rows (), fc = f.columns (); + octave_idx_type fr = f.rows (); std::vector vdata (f.numel ()); for (int i = 0; i < nf; i++) diff -r c3d21b9b94b6 -r 4976f66d469b src/graphics.cc --- a/src/graphics.cc Fri Jul 11 15:43:10 2008 -0400 +++ b/src/graphics.cc Fri Jul 11 17:59:28 2008 -0400 @@ -3160,8 +3160,6 @@ Matrix kids = xproperties.get_children (); - octave_idx_type n = kids.numel (); - double min_val = octave_Inf; double max_val = -octave_Inf; double min_pos = octave_Inf; @@ -3491,8 +3489,6 @@ { Matrix kids = xproperties.get_children (); - octave_idx_type n = kids.numel (); - double min_val = octave_Inf; double max_val = -octave_Inf; double min_pos = octave_Inf; @@ -4172,7 +4168,7 @@ return octave_value (gh_manager::figure_handle_list ()); } -DEFUN (available_backends, args, , +DEFUN (available_backends, , , "-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} available_backends ()\n\ Returns resgistered graphics backends.\n\ diff -r c3d21b9b94b6 -r 4976f66d469b src/pt-cmd.cc --- a/src/pt-cmd.cc Fri Jul 11 15:43:10 2008 -0400 +++ b/src/pt-cmd.cc Fri Jul 11 17:59:28 2008 -0400 @@ -32,7 +32,7 @@ tree_command * tree_no_op_command::dup (symbol_table::scope_id, - symbol_table::context_id context) + symbol_table::context_id /*context*/) { return new tree_no_op_command (orig_cmd, line (), column ()); } @@ -65,7 +65,7 @@ tree_command * tree_function_def::dup (symbol_table::scope_id, - symbol_table::context_id context) + symbol_table::context_id /*context*/) { return new tree_function_def (fcn, line (), column ()); } diff -r c3d21b9b94b6 -r 4976f66d469b src/pt-const.cc --- a/src/pt-const.cc Fri Jul 11 15:43:10 2008 -0400 +++ b/src/pt-const.cc Fri Jul 11 17:59:28 2008 -0400 @@ -72,7 +72,7 @@ tree_expression * tree_constant::dup (symbol_table::scope_id, - symbol_table::context_id context) + symbol_table::context_id /*context*/) { tree_constant *new_tc = new tree_constant (val, orig_text, line (), column ()); diff -r c3d21b9b94b6 -r 4976f66d469b src/pt-id.cc --- a/src/pt-id.cc Fri Jul 11 15:43:10 2008 -0400 +++ b/src/pt-id.cc Fri Jul 11 17:59:28 2008 -0400 @@ -120,7 +120,7 @@ tree_identifier * tree_identifier::dup (symbol_table::scope_id sc, - symbol_table::context_id context) + symbol_table::context_id /*context*/) { // The new tree_identifier object contains a symbol_record // entry from the duplicated scope. diff -r c3d21b9b94b6 -r 4976f66d469b src/pt-jump.cc --- a/src/pt-jump.cc Fri Jul 11 15:43:10 2008 -0400 +++ b/src/pt-jump.cc Fri Jul 11 17:59:28 2008 -0400 @@ -50,7 +50,7 @@ tree_command * tree_break_command::dup (symbol_table::scope_id, - symbol_table::context_id context) + symbol_table::context_id /*context*/) { return new tree_break_command (line (), column ()); } @@ -77,7 +77,7 @@ tree_command * tree_continue_command::dup (symbol_table::scope_id, - symbol_table::context_id context) + symbol_table::context_id /*context*/) { return new tree_continue_command (line (), column ()); } @@ -104,7 +104,7 @@ tree_command * tree_return_command::dup (symbol_table::scope_id, - symbol_table::context_id context) + symbol_table::context_id /*context*/) { return new tree_return_command (line (), column ()); } diff -r c3d21b9b94b6 -r 4976f66d469b src/syscalls.cc --- a/src/syscalls.cc Fri Jul 11 15:43:10 2008 -0400 +++ b/src/syscalls.cc Fri Jul 11 17:59:28 2008 -0400 @@ -1596,7 +1596,7 @@ } static octave_value -const_value (const char *nm, const octave_value_list& args, int val) +const_value (const octave_value_list& args, int val) { octave_value retval; @@ -1623,7 +1623,7 @@ @seealso{fcntl, F_GETFD, F_GETFL, F_SETFD, F_SETFL}\n\ @end deftypefn") { - return const_value ("F_DUPFD", args, F_DUPFD); + return const_value (args, F_DUPFD); } #endif @@ -1636,7 +1636,7 @@ @seealso{fcntl, F_DUPFD, F_GETFL, F_SETFD, F_SETFL}\n\ @end deftypefn") { - return const_value ("F_GETFD", args, F_GETFD); + return const_value (args, F_GETFD); } #endif @@ -1649,7 +1649,7 @@ @seealso{fcntl, F_DUPFD, F_GETFD, F_SETFD, F_SETFL}\n\ @end deftypefn") { - return const_value ("F_GETFL", args, F_GETFL); + return const_value (args, F_GETFL); } #endif @@ -1662,7 +1662,7 @@ @seealso{fcntl, F_DUPFD, F_GETFD, F_GETFL, F_SETFL}\n\ @end deftypefn") { - return const_value ("F_SETFD", args, F_SETFD); + return const_value (args, F_SETFD); } #endif @@ -1675,7 +1675,7 @@ @seealso{fcntl, F_DUPFD, F_GETFD, F_GETFL, F_SETFD}\n\ @end deftypefn") { - return const_value ("F_SETFL", args, F_SETFL); + return const_value (args, F_SETFL); } #endif @@ -1689,7 +1689,7 @@ @seealso{fcntl, O_ASYNC, O_CREAT, O_EXCL, O_NONBLOCK, O_RDONLY, O_RDWR, O_SYNC, O_TRUNC, O_WRONLY}\n\ @end deftypefn") { - return const_value ("O_APPEND", args, O_APPEND); + return const_value (args, O_APPEND); } #endif @@ -1702,7 +1702,7 @@ @seealso{fcntl, O_APPEND, O_CREAT, O_EXCL, O_NONBLOCK, O_RDONLY, O_RDWR, O_SYNC, O_TRUNC, O_WRONLY}\n\ @end deftypefn") { - return const_value ("O_ASYNC", args, O_ASYNC); + return const_value (args, O_ASYNC); } #endif @@ -1716,7 +1716,7 @@ @seealso{fcntl, O_APPEND, O_ASYNC, O_EXCL, O_NONBLOCK, O_RDONLY, O_RDWR, O_SYNC, O_TRUNC, O_WRONLY}\n\ @end deftypefn") { - return const_value ("O_CREAT", args, O_CREAT); + return const_value (args, O_CREAT); } #endif @@ -1729,7 +1729,7 @@ @seealso{fcntl, O_APPEND, O_ASYNC, O_CREAT, O_NONBLOCK, O_RDONLY, O_RDWR, O_SYNC, O_TRUNC, O_WRONLY}\n\ @end deftypefn") { - return const_value ("O_EXCL", args, O_EXCL); + return const_value (args, O_EXCL); } #endif @@ -1743,7 +1743,7 @@ @seealso{fcntl, O_APPEND, O_ASYNC, O_CREAT, O_EXCL, O_RDONLY, O_RDWR, O_SYNC, O_TRUNC, O_WRONLY}\n\ @end deftypefn") { - return const_value ("O_NONBLOCK", args, O_NONBLOCK); + return const_value (args, O_NONBLOCK); } #endif @@ -1757,7 +1757,7 @@ @seealso{fcntl, O_APPEND, O_ASYNC, O_CREAT, O_EXCL, O_NONBLOCK, O_RDWR, O_SYNC, O_TRUNC, O_WRONLY}\n\ @end deftypefn") { - return const_value ("O_RDONLY", args, O_RDONLY); + return const_value (args, O_RDONLY); } #endif @@ -1771,7 +1771,7 @@ @seealso{fcntl, O_APPEND, O_ASYNC, O_CREAT, O_EXCL, O_NONBLOCK, O_RDONLY, O_SYNC, O_TRUNC, O_WRONLY}\n\ @end deftypefn") { - return const_value ("O_RDWR", args, O_RDWR); + return const_value (args, O_RDWR); } #endif @@ -1785,7 +1785,7 @@ @seealso{fcntl, O_APPEND, O_ASYNC, O_CREAT, O_EXCL, O_NONBLOCK, O_RDONLY, O_RDWR, O_TRUNC, O_WRONLY}\n\ @end deftypefn") { - return const_value ("O_SYNC", args, O_SYNC); + return const_value (args, O_SYNC); } #endif @@ -1799,7 +1799,7 @@ @seealso{fcntl, O_APPEND, O_ASYNC, O_CREAT, O_EXCL, O_NONBLOCK, O_RDONLY, O_RDWR, O_SYNC, O_WRONLY}\n\ @end deftypefn") { - return const_value ("O_TRUNC", args, O_TRUNC); + return const_value (args, O_TRUNC); } #endif @@ -1813,7 +1813,7 @@ @seealso{fcntl, O_APPEND, O_ASYNC, O_CREAT, O_EXCL, O_NONBLOCK, O_RDONLY, O_RDWR, O_SYNC, O_TRUNC}\n\ @end deftypefn") { - return const_value ("O_WRONLY", args, O_WRONLY); + return const_value (args, O_WRONLY); } #endif @@ -1830,7 +1830,7 @@ @seealso{waitpid, WUNTRACED, WCONTINUE}\n\ @end deftypefn") { - return const_value ("WNOHANG", args, WNOHANG); + return const_value (args, WNOHANG); } #if !defined (WUNTRACED) @@ -1847,7 +1847,7 @@ @seealso{waitpid, WNOHANG, WCONTINUE}\n\ @end deftypefn") { - return const_value ("WUNTRACED", args, WUNTRACED); + return const_value (args, WUNTRACED); } #if !defined (WCONTINUE) @@ -1864,7 +1864,7 @@ @seealso{waitpid, WNOHANG, WUNTRACED}\n\ @end deftypefn") { - return const_value ("WCONTINUE", args, WCONTINUE); + return const_value (args, WCONTINUE); } /*