view src/of-ocs-3-break-fixes.patch @ 5893:53a6c7df43f8

Mesa 3D: Update to version 21.1.8. * src/mesa.mk: Update version and checksum. * src/mesa-2-uninitialized.patch: Remove file. * dist-files.mk: Remove file from list.
author Markus Mützel <markus.muetzel@gmx.de>
date Thu, 16 Sep 2021 22:37:45 +0200
parents 372ea4c0afb2
children
line wrap: on
line source

From 5df16dfd3522c2d1c4fdf7ed28f9efefc1b64df5 Mon Sep 17 00:00:00 2001
From: JohnD <john.donoghue@ieee.org>
Date: Fri, 4 May 2018 08:41:26 -0400
Subject: [PATCH] remove 'break' statement from switch statements (Bug #51510)

* inst/sbn/Mcapacitors.m, inst/sbn/Mcurrentsources.m,
  inst/sbn/Mdiode.m, inst/sbn/Mnmosfet.m, inst/sbn/Mpmosfet.m,
  inst/sbn/Mresistors.m, inst/sbn/Mshichmanhodgesmosfet.m,
  inst/sbn/Mvoltagesources.m: remove break; from switch statements
---
 inst/sbn/Mcapacitors.m           | 6 +-----
 inst/sbn/Mcurrentsources.m       | 2 --
 inst/sbn/Mdiode.m                | 3 ---
 inst/sbn/Mnmosfet.m              | 2 --
 inst/sbn/Mpmosfet.m              | 3 ---
 inst/sbn/Mresistors.m            | 5 -----
 inst/sbn/Mshichmanhodgesmosfet.m | 7 +------
 inst/sbn/Mvoltagesources.m       | 8 ++------
 8 files changed, 4 insertions(+), 32 deletions(-)

diff --git a/inst/sbn/Mcapacitors.m b/inst/sbn/Mcapacitors.m
index fdb22b1..7c3784e 100644
--- a/inst/sbn/Mcapacitors.m
+++ b/inst/sbn/Mcapacitors.m
@@ -72,7 +72,6 @@ function [a,b,c] = Mcapacitors(string,parameters,parameternames,extvar,intvar,t)
       a = [0 0 1; 0 0 -1; 0 0 0];
       b = [0 0 0;0 0 0;-C C 1];
       c = [0 0 0]';
-      break
 
     case "MULTICAP"
       
@@ -83,8 +82,6 @@ function [a,b,c] = Mcapacitors(string,parameters,parameternames,extvar,intvar,t)
       b = [zeros(n) zeros(n); -C eye(n)];
       c = [zeros(2*n,1)]';
       
-      break  
-
       ##NLC part
     case "PDE_NMOS"
       
@@ -111,7 +108,6 @@ function [a,b,c] = Mcapacitors(string,parameters,parameternames,extvar,intvar,t)
       a = [0 0 1; 0 0 -1; 0 0 0];
       b = [0 0 0;0 0 0;C -C -1];
       c = [0 0 Q-q]';
-      break  
 
     otherwise
       error (["unknown section:" string])
@@ -175,4 +171,4 @@ function [Q,C]=Mnmoscap(tbulk,tox,Area,Vg,Na,Nnodes,toll,maxit);
   C = Area*C*(q*ns*xs/Vs);
   Q = Area*Q*(q*ns*xs);
 
-endfunction
\ No newline at end of file
+endfunction
diff --git a/inst/sbn/Mcurrentsources.m b/inst/sbn/Mcurrentsources.m
index 707aa75..e65078c 100644
--- a/inst/sbn/Mcurrentsources.m
+++ b/inst/sbn/Mcurrentsources.m
@@ -71,7 +71,6 @@ function [a,b,c] = Mcurrentsources (string,parameters,parameternames,extvar,intv
       a = zeros(2);
       b = a;
       c = [I -I]';
-      break
 
     case "VCCS"
       ## Voltage controlled current source
@@ -96,7 +95,6 @@ function [a,b,c] = Mcurrentsources (string,parameters,parameternames,extvar,intv
       a = zeros(2);
       b = a;
       c = [I -I]';
-      break
       
     case "VCPS"
       ## Voltage controlled power source
diff --git a/inst/sbn/Mdiode.m b/inst/sbn/Mdiode.m
index 9db5410..44a4b00 100644
--- a/inst/sbn/Mdiode.m
+++ b/inst/sbn/Mdiode.m
@@ -74,7 +74,6 @@ function [a,b,c] = Mdiode (string,parameters,parameternames,extvar,intvar,t)
       a = zeros(2);
       b = [geq -geq; -geq geq];
       c = [I ; -I] ;
-      break
 
     case "PDEsymmetric"
 
@@ -102,8 +101,6 @@ function [a,b,c] = Mdiode (string,parameters,parameternames,extvar,intvar,t)
       b = [g -g; -g g];
       c = [I ; -I] ;
       
-      break
-
     otherwise
       error(["unknown section:" string])
   endswitch
diff --git a/inst/sbn/Mnmosfet.m b/inst/sbn/Mnmosfet.m
index 5fe4962..e2b9504 100644
--- a/inst/sbn/Mnmosfet.m
+++ b/inst/sbn/Mnmosfet.m
@@ -112,7 +112,6 @@ function [a,b,c]=Mnmosfet(string,parameters,parameternames,extvar,intvar,t)
 	   0    0       0  0];
       
       c = [0 -id id 0]';
-      break;
 
     case "lincap"
 
@@ -153,7 +152,6 @@ function [a,b,c]=Mnmosfet(string,parameters,parameternames,extvar,intvar,t)
       b = B+Jac;
       c = res + B*[extvar;intvar] + C;
 
-      break;
     otherwise
       error(["unknown option:" string]);
   endswitch
diff --git a/inst/sbn/Mpmosfet.m b/inst/sbn/Mpmosfet.m
index c4fbae3..58ef919 100644
--- a/inst/sbn/Mpmosfet.m
+++ b/inst/sbn/Mpmosfet.m
@@ -108,7 +108,6 @@ function [a,b,c]= Mpmosfet (string,parameters,parameternames,extvar,intvar,t)
            0    0       0   0 ];
       
       c =[0 -id id 0]';
-      break;
 
     case "lincap"
       
@@ -144,8 +143,6 @@ function [a,b,c]= Mpmosfet (string,parameters,parameternames,extvar,intvar,t)
       b = B+Jac;
       c = res + B*[extvar;intvar] + C;
 
-      break;
-
     otherwise
       error(["unknown option:" string]);
   endswitch
diff --git a/inst/sbn/Mresistors.m b/inst/sbn/Mresistors.m
index e8862b9..e0d43d4 100644
--- a/inst/sbn/Mresistors.m
+++ b/inst/sbn/Mresistors.m
@@ -75,7 +75,6 @@ function [a,b,c] = Mresistors (string, parameters, parameternames,
       b = [1 -1 ;-1 1]/R;
       c = -[0; 0];
       
-      break
       ##NLCpart
     case "THERMAL"
 
@@ -100,8 +99,6 @@ function [a,b,c] = Mresistors (string, parameters, parameternames,
 	   -2*(v1-v2)/RT -2*(v2-v1)/RT (v1-v2)^2*dRdT/RT^2];
       c = [i1 i2 P]';
       
-      break;
-      
       case "THERMAL1D"
       	 
 	 for ii=1:length(parameternames)
@@ -123,8 +120,6 @@ function [a,b,c] = Mresistors (string, parameters, parameternames,
 	 b = k*(S/h)*[B(ext,ext), B(ext,int); B(int,ext), B(int,int)];
 	 c = zeros(N+1,1);
       
-      break;
-      
       otherwise
       error (["unknown section:" string])
   endswitch
diff --git a/inst/sbn/Mshichmanhodgesmosfet.m b/inst/sbn/Mshichmanhodgesmosfet.m
index d5a2c93..893872d 100644
--- a/inst/sbn/Mshichmanhodgesmosfet.m
+++ b/inst/sbn/Mshichmanhodgesmosfet.m
@@ -140,9 +140,6 @@ function [a,b,c]= Mshichmanhodgesmosfet (string,parameters,parameternames,extvar
 	
 	c = [c1;c2];
 	
-
-	break;
-
       case "PMOS"
 	
 	rd   = 1e6;
@@ -218,8 +215,6 @@ function [a,b,c]= Mshichmanhodgesmosfet (string,parameters,parameternames,extvar
 	
 	c = [c1;c2];
 	
-	break;
-
       otherwise
 	error(["unknown option:" string]);
     endswitch
@@ -329,4 +324,4 @@ function [gm,gd,ids,didT,P,dPdT,dPdvgs,dPdvds] = pmos(extvar,mu0,Cox,W,L,Vth,rd,
   dPdvgs  = -(gm*vds);
   dPdvds  = -(gd*vds + ids);
   
-endfunction
\ No newline at end of file
+endfunction
diff --git a/inst/sbn/Mvoltagesources.m b/inst/sbn/Mvoltagesources.m
index b0a9819..e0a2408 100644
--- a/inst/sbn/Mvoltagesources.m
+++ b/inst/sbn/Mvoltagesources.m
@@ -92,7 +92,7 @@ function [a,b,c] = Mvoltagesources (string,parameters,parameternames,extvar,intv
       a = zeros(3);
       b = [0 0 1;0 0 -1;1 -1 0];
       c = [0 0 -V];
-      break
+
       ## NLC part
     case "sinwave"
       for ii=1:length(parameternames)
@@ -105,7 +105,6 @@ function [a,b,c] = Mvoltagesources (string,parameters,parameternames,extvar,intv
       a = zeros(3);
       b = [0 0 1;0 0 -1;1 -1 0];
       c = [0 0 -DV]' + b * [extvar;intvar];
-      break
     
     case "pwl"
 
@@ -118,7 +117,6 @@ function [a,b,c] = Mvoltagesources (string,parameters,parameternames,extvar,intv
       a = zeros(3);
       b = [0 0 1;0 0 -1;1 -1 0];
       c = [0 0 -DV]' + b * [extvar;intvar];
-      break
       
     case "squarewave"
       for ii=1:length(parameternames)
@@ -144,7 +142,6 @@ function [a,b,c] = Mvoltagesources (string,parameters,parameternames,extvar,intv
       a = zeros(3);
       b = [0 0 1;0 0 -1;1 -1 0];
       c = [0 0 -DV]' + b * [extvar;intvar];
-      break
 
     case "step"
       for ii=1:length(parameternames)
@@ -162,7 +159,6 @@ function [a,b,c] = Mvoltagesources (string,parameters,parameternames,extvar,intv
       a = zeros(3);
       b = [0 0 1;0 0 -1;1 -1 0];
       c = [0 0 -DV]' + b * [extvar;intvar];
-      break
       
     case "VCVS"
       K = 1;
@@ -175,7 +171,7 @@ function [a,b,c] = Mvoltagesources (string,parameters,parameternames,extvar,intv
       a = zeros(5);
       b = [0 0 0 0 1;0 0 0 0 -1;0 0 0 0 0;0 0 0 0 0;1 -1 -K K 0];
       c = zeros(5,1);
-      break
+
     otherwise
       error (["unknown section:" string])
   endswitch
-- 
2.14.3