mirror of
				https://github.com/neovim/neovim.git
				synced 2025-11-04 09:44:31 +00:00 
			
		
		
		
	fix(ex_getln): initialize pointer with NULL
In function ‘cmdpreview_open_win’,
    inlined from ‘cmdpreview_may_show’ at gsrc/nvim/ex_getln.c:2487:28:
gsrc/nvim/ex_getln.c:2251:16: warning: ‘cmdpreview_buf’ may be used uninitialized [-Wmaybe-uninitialized]
 2251 |   int result = do_buffer(DOBUF_GOTO, DOBUF_FIRST, FORWARD, cmdpreview_buf->handle, 0);
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
			
			
This commit is contained in:
		@@ -2446,7 +2446,7 @@ static bool cmdpreview_may_show(CommandLineState *s)
 | 
			
		||||
 | 
			
		||||
  CpInfo cpinfo;
 | 
			
		||||
  bool icm_split = *p_icm == 's';  // inccommand=split
 | 
			
		||||
  buf_T *cmdpreview_buf;
 | 
			
		||||
  buf_T *cmdpreview_buf = NULL;
 | 
			
		||||
  win_T *cmdpreview_win = NULL;
 | 
			
		||||
 | 
			
		||||
  emsg_silent++;                 // Block error reporting as the command may be incomplete,
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user