zsh-workers
 help / color / mirror / code / Atom feed
* [PATCH] vcs_info: Prevent warn_create_global warning with '-preinit-' state
@ 2015-10-18 18:27 Frank Terbeck
  0 siblings, 0 replies; only message in thread
From: Frank Terbeck @ 2015-10-18 18:27 UTC (permalink / raw)
  To: zsh-workers

This is related to 33405. Turns out that not all other calls to
VCS_INFO_set are okay: With recent zsh versions the early call to that
function with the '-preinit-' argument causes a warning like this:

  VCS_INFO_set:9: math parameter maxexports created globally
                  in function VCS_INFO_set

This fixes it.
---
 Functions/VCS_Info/vcs_info | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Functions/VCS_Info/vcs_info b/Functions/VCS_Info/vcs_info
index 350b189..628dde9 100644
--- a/Functions/VCS_Info/vcs_info
+++ b/Functions/VCS_Info/vcs_info
@@ -11,6 +11,7 @@
 setopt localoptions noksharrays extendedglob NO_shwordsplit
 local file func sys
 local -a static_functions
+local -i maxexports
 
 static_functions=(
     VCS_INFO_adjust
@@ -38,6 +39,7 @@ for func in ${static_functions} ; do
 done
 
 [[ -n ${(Mk)parameters:#vcs_info_msg_<->_} ]] && unset ${parameters[(I)vcs_info_msg_<->_]}
+VCS_INFO_maxexports
 VCS_INFO_set --nvcs '-preinit-'
 vcs_info_setsys
 
-- 
2.1.4


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-10-18 18:38 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-18 18:27 [PATCH] vcs_info: Prevent warn_create_global warning with '-preinit-' state Frank Terbeck

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).