Mercurial > mxe-octave
comparison src/of-queueing-1-octave7.patch @ 6161:8fcac4d6d983 release
of-queueing: Fix syntax error with Octave 7 (bug #62314).
* src/of-queueing-1-octave7.patch: Add new file.
* dist-files.mk: Include new patch.
author | Markus Mützel <markus.muetzel@gmx.de> |
---|---|
date | Thu, 14 Apr 2022 19:27:13 +0200 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
6147:ccb904fafc30 | 6161:8fcac4d6d983 |
---|---|
1 Description: Fix FTBFS against Octave 7 | |
2 print_usage() was called within a logical expression. Since it does not return | |
3 a value, this fails with Octave 7 since the latter does stricter checks on | |
4 number of output arguments. | |
5 This patch uses an if/endif conditional rather than a logical short-circuit | |
6 expression. | |
7 Author: Sébastien Villemot <sebastien@debian.org> | |
8 Bug: https://savannah.gnu.org/bugs/?62314 | |
9 Bug-Debian: https://bugs.debian.org/1009135 | |
10 Last-Update: 2022-04-14 | |
11 --- | |
12 This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ | |
13 --- a/inst/qnmknode.m | |
14 +++ b/inst/qnmknode.m | |
15 @@ -126,22 +126,25 @@ function Q = qnmknode( node, S, varargin | |
16 endif | |
17 elseif ( strcmp(node, "-/g/1-lcfs-pr") ) | |
18 ## -/G/1-LCFS-PR node | |
19 - ( 2 == nargin || 3 == nargin ) || ... | |
20 - print_usage(); | |
21 + if ~( 2 == nargin || 3 == nargin ) | |
22 + print_usage(); | |
23 + endif | |
24 if ( 3 == nargin ) | |
25 s2 = varargin{1}; | |
26 endif | |
27 elseif ( strcmp(node, "-/g/1-ps") ) | |
28 ## -/G/1-PS (processor sharing) node | |
29 - ( 2 == nargin || 3 == nargin ) || ... | |
30 - print_usage(); | |
31 + if ~( 2 == nargin || 3 == nargin ) | |
32 + print_usage(); | |
33 + endif | |
34 if ( 3 == nargin ) | |
35 s2 = varargin{1}; | |
36 endif | |
37 elseif ( strcmp(node, "-/g/inf") ) | |
38 ## -/G/inf (Infinite Server) node | |
39 - ( 2 == nargin || 3 == nargin ) || ... | |
40 - print_usage(); | |
41 + if ~( 2 == nargin || 3 == nargin ) | |
42 + print_usage(); | |
43 + endif | |
44 if ( 3 == nargin ) | |
45 s2 = varargin{1}; | |
46 endif |