From 9974c26b0830cc9c51942e6ec7ab005b8310517a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Villemot?= <sebastien@dynare.org> Date: Tue, 21 Jan 2020 16:55:42 +0100 Subject: [PATCH] Disable spurious warnings as early as possible This is necessary for Octave under Windows, to avoid a warning about isdir() triggered by user_has_octave_forge_package.m. (cherry picked from commit 9f51b2508a4ed6903400788bee0e366af96a7281) --- matlab/dynare.m | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/matlab/dynare.m b/matlab/dynare.m index 7a036cbf41..8da06cab20 100644 --- a/matlab/dynare.m +++ b/matlab/dynare.m @@ -16,7 +16,7 @@ function dynare(fname, varargin) % SPECIAL REQUIREMENTS % none -% Copyright (C) 2001-2019 Dynare Team +% Copyright (C) 2001-2020 Dynare Team % % This file is part of Dynare. % @@ -45,6 +45,9 @@ if ~nargin || strcmpi(fname,'help') return end +% The following needs to come early, to avoid spurious warnings (especially under Octave) +warning_config; + % Set default local options change_path_flag = true; @@ -65,8 +68,6 @@ check_matlab_path(change_path_flag); % Detect if MEX files are present; if not, use alternative M-files dynareroot = dynare_config(); -warning_config() - if isoctave % The supported_octave_version.m file is not in git nor in the source % package, it is manually added in binary packages distributed on dynare.org -- GitLab