Mercurial > vim
comparison src/os_win32.c @ 31505:dc282943639c v9.0.1085
patch 9.0.1085: compiler warns for uninitialized variable
Commit: https://github.com/vim/vim/commit/9b8a365d019bb948efba5b5276d52bdd99e15d05
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Dec 20 20:47:28 2022 +0000
patch 9.0.1085: compiler warns for uninitialized variable
Problem: Compiler warns for uninitialized variable.
Solution: Initialize the variable. Remove unused function. (John Marriott)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 20 Dec 2022 22:00:04 +0100 |
parents | b9a4699d6a35 |
children | 26a32a3f05af |
comparison
equal
deleted
inserted
replaced
31504:19e5fba4fffb | 31505:dc282943639c |
---|---|
191 input_record_buffer_node_T *head; | 191 input_record_buffer_node_T *head; |
192 input_record_buffer_node_T *tail; | 192 input_record_buffer_node_T *tail; |
193 int length; | 193 int length; |
194 } input_record_buffer_T; | 194 } input_record_buffer_T; |
195 static input_record_buffer_T input_record_buffer; | 195 static input_record_buffer_T input_record_buffer; |
196 static int peek_input_record_buffer(INPUT_RECORD* irEvents, int nMaxLength); | |
197 static int read_input_record_buffer(INPUT_RECORD* irEvents, int nMaxLength); | 196 static int read_input_record_buffer(INPUT_RECORD* irEvents, int nMaxLength); |
198 static int write_input_record_buffer(INPUT_RECORD* irEvents, int nLength); | 197 static int write_input_record_buffer(INPUT_RECORD* irEvents, int nLength); |
199 #endif | 198 #endif |
200 #ifdef FEAT_GUI_MSWIN | 199 #ifdef FEAT_GUI_MSWIN |
201 static int s_dont_use_vimrun = TRUE; | 200 static int s_dont_use_vimrun = TRUE; |
1733 { | 1732 { |
1734 int button; | 1733 int button; |
1735 int row; | 1734 int row; |
1736 int col; | 1735 int col; |
1737 int repeated_click; | 1736 int repeated_click; |
1738 int_u mods; | 1737 int_u mods = 0; |
1739 int move; | 1738 int move; |
1740 | 1739 |
1741 if (!dict_has_key(args, "row") || !dict_has_key(args, "col")) | 1740 if (!dict_has_key(args, "row") || !dict_has_key(args, "col")) |
1742 return FALSE; | 1741 return FALSE; |
1743 | 1742 |
1874 irEvents[nCount++] = pop_head->ir; | 1873 irEvents[nCount++] = pop_head->ir; |
1875 input_record_buffer.head = pop_head->next; | 1874 input_record_buffer.head = pop_head->next; |
1876 vim_free(pop_head); | 1875 vim_free(pop_head); |
1877 if (input_record_buffer.length == 0) | 1876 if (input_record_buffer.length == 0) |
1878 input_record_buffer.tail = NULL; | 1877 input_record_buffer.tail = NULL; |
1879 } | |
1880 return nCount; | |
1881 } | |
1882 static int | |
1883 peek_input_record_buffer(INPUT_RECORD* irEvents, int nMaxLength) | |
1884 { | |
1885 int nCount = 0; | |
1886 input_record_buffer_node_T *temp = input_record_buffer.head; | |
1887 while (nCount < nMaxLength && temp != NULL) | |
1888 { | |
1889 irEvents[nCount++] = temp->ir; | |
1890 temp = temp->next; | |
1891 } | 1878 } |
1892 return nCount; | 1879 return nCount; |
1893 } | 1880 } |
1894 #endif // !FEAT_GUI_MSWIN || VIMDLL | 1881 #endif // !FEAT_GUI_MSWIN || VIMDLL |
1895 | 1882 |