From b3594ff3a09b863412d17c647190a67b952cef6a Mon Sep 17 00:00:00 2001 From: Kris Thielemans Date: Wed, 29 Dec 2021 23:25:36 +0000 Subject: [PATCH] [MATLAB] simplify SwigRef.subsref SwigRef.subsref used an empty () index, generating warnings with recent Octave. This was superfluous so I've removed it. Fixes https://github.com/jaeandersson/swig/issues/99 --- Source/Modules/matlab.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Modules/matlab.cxx b/Source/Modules/matlab.cxx index d79f7590a94..21fdae87906 100644 --- a/Source/Modules/matlab.cxx +++ b/Source/Modules/matlab.cxx @@ -2759,7 +2759,7 @@ void MATLAB::createSwigRef() { Printf(f_wrap_m, " if numel(s)==1\n"); Printf(f_wrap_m, " switch s.type\n"); Printf(f_wrap_m, " case '.'\n"); - Printf(f_wrap_m, " [varargout{1}] = builtin('subsref',self,substruct('.',s.subs,'()',{}));\n"); + Printf(f_wrap_m, " [varargout{1}] = builtin('subsref',self,substruct('.',s.subs));\n"); Printf(f_wrap_m, " case '()'\n"); Printf(f_wrap_m, " [varargout{1:nargout}] = builtin('subsref',self,substruct('.','paren','()',s.subs));\n"); Printf(f_wrap_m, " case '{}'\n");