Mercurial > hg > octave-jordi
comparison libinterp/corefcn/ls-mat4.cc @ 20830:35241c4b696c
eliminate return statements after calls to error
* Cell.cc, __ichol__.cc, __lin_interpn__.cc, __pchip_deriv__.cc,
besselj.cc, cellfun.cc, colloc.cc, debug.cc, dlmread.cc,
dynamic-ld.cc, filter.cc, find.cc, gl2ps-renderer.cc, load-path.cc,
load-save.cc, ls-mat4.cc, ls-mat5.cc, ls-oct-text.cc, luinc.cc,
max.cc, nproc.cc, oct-hist.cc, oct-map.cc, oct-obj.cc, oct-stream.cc,
ordschur.cc, pinv.cc, pr-output.cc, profiler.cc, psi.cc, quadcc.cc,
qz.cc, rand.cc, strfind.cc, strfns.cc, sysdep.cc, toplev.cc, tril.cc,
typecast.cc, urlwrite.cc, utils.cc, variables.cc: Eliminate return
statements after calls to error.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Wed, 09 Dec 2015 14:00:43 -0500 |
parents | f90c8372b7ba |
children | 384ff5aa9437 |
comparison
equal
deleted
inserted
replaced
20829:ae0bd73671f3 | 20830:35241c4b696c |
---|---|
164 | 164 |
165 if (mopt > 9999 || mopt < 0 || imag > 1 || imag < 0) | 165 if (mopt > 9999 || mopt < 0 || imag > 1 || imag < 0) |
166 { | 166 { |
167 if (! quiet) | 167 if (! quiet) |
168 error ("load: can't read binary file"); | 168 error ("load: can't read binary file"); |
169 | |
169 return -1; | 170 return -1; |
170 } | 171 } |
171 | 172 |
172 return 0; | 173 return 0; |
173 | 174 |
275 mach = mopt % 10; // IEEE, VAX, etc. | 276 mach = mopt % 10; // IEEE, VAX, etc. |
276 | 277 |
277 flt_fmt = mopt_digit_to_float_format (mach); | 278 flt_fmt = mopt_digit_to_float_format (mach); |
278 | 279 |
279 if (flt_fmt == oct_mach_info::flt_fmt_unknown) | 280 if (flt_fmt == oct_mach_info::flt_fmt_unknown) |
280 { | 281 error ("load: unrecognized binary format!"); |
281 error ("load: unrecognized binary format!"); | |
282 return retval; | |
283 } | |
284 | 282 |
285 if (imag && type == 1) | 283 if (imag && type == 1) |
286 { | 284 error ("load: encountered complex matrix with string flag set!"); |
287 error ("load: encountered complex matrix with string flag set!"); | |
288 return retval; | |
289 } | |
290 | 285 |
291 // LEN includes the terminating character, and the file is also | 286 // LEN includes the terminating character, and the file is also |
292 // supposed to include it, but apparently not all files do. Either | 287 // supposed to include it, but apparently not all files do. Either |
293 // way, I think this should work. | 288 // way, I think this should work. |
294 | 289 |
372 re.resize (nr, nc); | 367 re.resize (nr, nc); |
373 | 368 |
374 read_mat_binary_data (is, re.fortran_vec (), prec, dlen, swap, flt_fmt); | 369 read_mat_binary_data (is, re.fortran_vec (), prec, dlen, swap, flt_fmt); |
375 | 370 |
376 if (! is) | 371 if (! is) |
377 { | 372 error ("load: reading matrix data for '%s'", name); |
378 error ("load: reading matrix data for '%s'", name); | |
379 goto data_read_error; | |
380 } | |
381 | 373 |
382 if (imag) | 374 if (imag) |
383 { | 375 { |
384 Matrix im (nr, nc); | 376 Matrix im (nr, nc); |
385 | 377 |
386 read_mat_binary_data (is, im.fortran_vec (), prec, dlen, swap, | 378 read_mat_binary_data (is, im.fortran_vec (), prec, dlen, swap, |
387 flt_fmt); | 379 flt_fmt); |
388 | 380 |
389 if (! is) | 381 if (! is) |
390 { | 382 error ("load: reading imaginary matrix data for '%s'", name); |
391 error ("load: reading imaginary matrix data for '%s'", name); | |
392 goto data_read_error; | |
393 } | |
394 | 383 |
395 ComplexMatrix ctmp (nr, nc); | 384 ComplexMatrix ctmp (nr, nc); |
396 | 385 |
397 for (octave_idx_type j = 0; j < nc; j++) | 386 for (octave_idx_type j = 0; j < nc; j++) |
398 for (octave_idx_type i = 0; i < nr; i++) | 387 for (octave_idx_type i = 0; i < nr; i++) |