|
1 To: [email protected] |
|
2 Subject: Patch 7.2.185 |
|
3 Fcc: outbox |
|
4 From: Bram Moolenaar <[email protected]> |
|
5 Mime-Version: 1.0 |
|
6 Content-Type: text/plain; charset=UTF-8 |
|
7 Content-Transfer-Encoding: 8bit |
|
8 ------------ |
|
9 |
|
10 Patch 7.2.185 |
|
11 Problem: Some more compiler warnings when using gcc -Wextra. |
|
12 Solution: Add UNUSED and type casts. |
|
13 Files: src/Makefile, src/if_tlc.c, src/if_ruby.c |
|
14 |
|
15 |
|
16 *** ../vim-7.2.184/src/Makefile 2009-05-21 23:25:47.000000000 +0200 |
|
17 --- src/Makefile 2009-05-22 18:18:44.000000000 +0200 |
|
18 *************** |
|
19 *** 105,112 **** |
|
20 # 4. "make test" {{{1 |
|
21 # This is optional. This will run Vim scripts on a number of test |
|
22 # files, and compare the produced output with the expected output. |
|
23 ! # If all is well, you will get the "ALL DONE" message in the end. See |
|
24 ! # below (search for "/^test"). |
|
25 # |
|
26 # 5. "make install" {{{1 |
|
27 # If the new Vim seems to be working OK you can install it and the |
|
28 --- 105,112 ---- |
|
29 # 4. "make test" {{{1 |
|
30 # This is optional. This will run Vim scripts on a number of test |
|
31 # files, and compare the produced output with the expected output. |
|
32 ! # If all is well, you will get the "ALL DONE" message in the end. If a |
|
33 ! # test fails you get "TEST FAILURE". See below (search for "/^test"). |
|
34 # |
|
35 # 5. "make install" {{{1 |
|
36 # If the new Vim seems to be working OK you can install it and the |
|
37 *************** |
|
38 *** 533,538 **** |
|
39 --- 533,543 ---- |
|
40 #CFLAGS = -g -DDEBUG -Wall -Wshadow -Wmissing-prototypes |
|
41 #CFLAGS = -g -O2 '-DSTARTUPTIME="vimstartup"' -fno-strength-reduce -Wall -Wmissing-prototypes |
|
42 |
|
43 + # Use this with GCC to check for mistakes, unused arguments, etc. |
|
44 + #CFLAGS = -g -Wall -Wextra -Wmissing-prototypes -Wunreachable-code |
|
45 + #PYTHON_CFLAGS_EXTRA = -Wno-missing-field-initializers |
|
46 + #MZSCHEME_CFLAGS_EXTRA = -Wno-unreachable-code |
|
47 + |
|
48 # EFENCE - Electric-Fence malloc debugging: catches memory accesses beyond |
|
49 # allocated memory (and makes every malloc()/free() very slow). |
|
50 # Electric Fence is free (search ftp sites). |
|
51 *************** |
|
52 *** 551,562 **** |
|
53 # }}} |
|
54 |
|
55 # LINT - for running lint |
|
56 ! # For standard lint |
|
57 ! #LINT = lint |
|
58 ! #LINT_OPTIONS = -beprxzF |
|
59 ! # For splint (see cleanlint.vim for filtering the output) |
|
60 ! LINT = splint |
|
61 ! LINT_OPTIONS = +unixlib -weak -macrovarprefixexclude -showfunc -linelen 9999 |
|
62 |
|
63 # PROFILING - Uncomment the next two lines to do profiling with gcc and gprof. |
|
64 # Might not work with GUI or Perl. |
|
65 --- 556,568 ---- |
|
66 # }}} |
|
67 |
|
68 # LINT - for running lint |
|
69 ! # For standard Unix lint |
|
70 ! LINT = lint |
|
71 ! LINT_OPTIONS = -beprxzF |
|
72 ! # For splint |
|
73 ! # It doesn't work well, crashes on include files and non-ascii characters. |
|
74 ! #LINT = splint |
|
75 ! #LINT_OPTIONS = +unixlib -weak -macrovarprefixexclude -showfunc -linelen 9999 |
|
76 |
|
77 # PROFILING - Uncomment the next two lines to do profiling with gcc and gprof. |
|
78 # Might not work with GUI or Perl. |
|
79 *************** |
|
80 *** 1743,1749 **** |
|
81 # messages. Don't worry about that. |
|
82 # If there is a real error, there will be a difference between "test.out" and |
|
83 # a "test99.ok" file. |
|
84 ! # If everything is alright, the final message will be "ALL DONE". |
|
85 # |
|
86 test check: |
|
87 $(MAKE) -f Makefile $(VIMTARGET) |
|
88 --- 1749,1756 ---- |
|
89 # messages. Don't worry about that. |
|
90 # If there is a real error, there will be a difference between "test.out" and |
|
91 # a "test99.ok" file. |
|
92 ! # If everything is alright, the final message will be "ALL DONE". If not you |
|
93 ! # get "TEST FAILURE". |
|
94 # |
|
95 test check: |
|
96 $(MAKE) -f Makefile $(VIMTARGET) |
|
97 *************** |
|
98 *** 2427,2433 **** |
|
99 $(CCC) -o $@ if_xcmdsrv.c |
|
100 |
|
101 objects/if_mzsch.o: if_mzsch.c |
|
102 ! $(CCC) -o $@ if_mzsch.c |
|
103 |
|
104 objects/if_perl.o: auto/if_perl.c |
|
105 $(CCC) -o $@ auto/if_perl.c |
|
106 --- 2434,2440 ---- |
|
107 $(CCC) -o $@ if_xcmdsrv.c |
|
108 |
|
109 objects/if_mzsch.o: if_mzsch.c |
|
110 ! $(CCC) -o $@ $(MZSCHEME_CFLAGS_EXTRA) if_mzsch.c |
|
111 |
|
112 objects/if_perl.o: auto/if_perl.c |
|
113 $(CCC) -o $@ auto/if_perl.c |
|
114 *************** |
|
115 *** 2436,2442 **** |
|
116 $(CCC) -o $@ if_perlsfio.c |
|
117 |
|
118 objects/if_python.o: if_python.c |
|
119 ! $(CCC) -o $@ if_python.c |
|
120 |
|
121 objects/if_ruby.o: if_ruby.c |
|
122 $(CCC) -o $@ if_ruby.c |
|
123 --- 2443,2449 ---- |
|
124 $(CCC) -o $@ if_perlsfio.c |
|
125 |
|
126 objects/if_python.o: if_python.c |
|
127 ! $(CCC) -o $@ $(PYTHON_CFLAGS_EXTRA) if_python.c |
|
128 |
|
129 objects/if_ruby.o: if_ruby.c |
|
130 $(CCC) -o $@ if_ruby.c |
|
131 *** ../vim-7.2.184/src/if_ruby.c 2007-09-13 15:00:49.000000000 +0200 |
|
132 --- src/if_ruby.c 2009-05-22 15:32:04.000000000 +0200 |
|
133 *************** |
|
134 *** 492,498 **** |
|
135 } |
|
136 } |
|
137 |
|
138 ! static VALUE vim_message(VALUE self, VALUE str) |
|
139 { |
|
140 char *buff, *p; |
|
141 |
|
142 --- 492,498 ---- |
|
143 } |
|
144 } |
|
145 |
|
146 ! static VALUE vim_message(VALUE self UNUSED, VALUE str) |
|
147 { |
|
148 char *buff, *p; |
|
149 |
|
150 *************** |
|
151 *** 505,524 **** |
|
152 return Qnil; |
|
153 } |
|
154 |
|
155 ! static VALUE vim_set_option(VALUE self, VALUE str) |
|
156 { |
|
157 do_set((char_u *)STR2CSTR(str), 0); |
|
158 update_screen(NOT_VALID); |
|
159 return Qnil; |
|
160 } |
|
161 |
|
162 ! static VALUE vim_command(VALUE self, VALUE str) |
|
163 { |
|
164 do_cmdline_cmd((char_u *)STR2CSTR(str)); |
|
165 return Qnil; |
|
166 } |
|
167 |
|
168 ! static VALUE vim_evaluate(VALUE self, VALUE str) |
|
169 { |
|
170 #ifdef FEAT_EVAL |
|
171 char_u *value = eval_to_string((char_u *)STR2CSTR(str), NULL, TRUE); |
|
172 --- 505,524 ---- |
|
173 return Qnil; |
|
174 } |
|
175 |
|
176 ! static VALUE vim_set_option(VALUE self UNUSED, VALUE str) |
|
177 { |
|
178 do_set((char_u *)STR2CSTR(str), 0); |
|
179 update_screen(NOT_VALID); |
|
180 return Qnil; |
|
181 } |
|
182 |
|
183 ! static VALUE vim_command(VALUE self UNUSED, VALUE str) |
|
184 { |
|
185 do_cmdline_cmd((char_u *)STR2CSTR(str)); |
|
186 return Qnil; |
|
187 } |
|
188 |
|
189 ! static VALUE vim_evaluate(VALUE self UNUSED, VALUE str) |
|
190 { |
|
191 #ifdef FEAT_EVAL |
|
192 char_u *value = eval_to_string((char_u *)STR2CSTR(str), NULL, TRUE); |
|
193 *************** |
|
194 *** 580,586 **** |
|
195 return INT2NUM(n); |
|
196 } |
|
197 |
|
198 ! static VALUE buffer_s_aref(VALUE self, VALUE num) |
|
199 { |
|
200 buf_T *b; |
|
201 int n = NUM2INT(num); |
|
202 --- 580,586 ---- |
|
203 return INT2NUM(n); |
|
204 } |
|
205 |
|
206 ! static VALUE buffer_s_aref(VALUE self UNUSED, VALUE num) |
|
207 { |
|
208 buf_T *b; |
|
209 int n = NUM2INT(num); |
|
210 *************** |
|
211 *** 629,635 **** |
|
212 --- 629,637 ---- |
|
213 return line ? rb_str_new2(line) : Qnil; |
|
214 } |
|
215 rb_raise(rb_eIndexError, "index %d out of buffer", n); |
|
216 + #ifndef __GNUC__ |
|
217 return Qnil; /* For stop warning */ |
|
218 + #endif |
|
219 } |
|
220 |
|
221 static VALUE buffer_aref(VALUE self, VALUE num) |
|
222 *************** |
|
223 *** 668,674 **** |
|
224 --- 670,678 ---- |
|
225 else |
|
226 { |
|
227 rb_raise(rb_eIndexError, "index %d out of buffer", n); |
|
228 + #ifndef __GNUC__ |
|
229 return Qnil; /* For stop warning */ |
|
230 + #endif |
|
231 } |
|
232 return str; |
|
233 } |
|
234 *************** |
|
235 *** 789,795 **** |
|
236 return get_buffer_line(curbuf, curwin->w_cursor.lnum); |
|
237 } |
|
238 |
|
239 ! static VALUE set_current_line(VALUE self, VALUE str) |
|
240 { |
|
241 return set_buffer_line(curbuf, curwin->w_cursor.lnum, str); |
|
242 } |
|
243 --- 793,799 ---- |
|
244 return get_buffer_line(curbuf, curwin->w_cursor.lnum); |
|
245 } |
|
246 |
|
247 ! static VALUE set_current_line(VALUE self UNUSED, VALUE str) |
|
248 { |
|
249 return set_buffer_line(curbuf, curwin->w_cursor.lnum, str); |
|
250 } |
|
251 *************** |
|
252 *** 815,821 **** |
|
253 #endif |
|
254 } |
|
255 |
|
256 ! static VALUE window_s_aref(VALUE self, VALUE num) |
|
257 { |
|
258 win_T *w; |
|
259 int n = NUM2INT(num); |
|
260 --- 819,825 ---- |
|
261 #endif |
|
262 } |
|
263 |
|
264 ! static VALUE window_s_aref(VALUE self UNUSED, VALUE num) |
|
265 { |
|
266 win_T *w; |
|
267 int n = NUM2INT(num); |
|
268 *************** |
|
269 *** 897,903 **** |
|
270 return Qnil; |
|
271 } |
|
272 |
|
273 ! static VALUE f_p(int argc, VALUE *argv, VALUE self) |
|
274 { |
|
275 int i; |
|
276 VALUE str = rb_str_new("", 0); |
|
277 --- 901,907 ---- |
|
278 return Qnil; |
|
279 } |
|
280 |
|
281 ! static VALUE f_p(int argc, VALUE *argv, VALUE self UNUSED) |
|
282 { |
|
283 int i; |
|
284 VALUE str = rb_str_new("", 0); |
|
285 *** ../vim-7.2.184/src/version.c 2009-05-21 23:25:38.000000000 +0200 |
|
286 --- src/version.c 2009-05-22 18:18:58.000000000 +0200 |
|
287 *************** |
|
288 *** 678,679 **** |
|
289 --- 678,681 ---- |
|
290 { /* Add new patch number below this line */ |
|
291 + /**/ |
|
292 + 185, |
|
293 /**/ |
|
294 |
|
295 -- |
|
296 BODY: I'm not dead! |
|
297 CART DRIVER: 'Ere. He says he's not dead. |
|
298 LARGE MAN: Yes he is. |
|
299 BODY: I'm not! |
|
300 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD |
|
301 |
|
302 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\ |
|
303 /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ |
|
304 \\\ download, build and distribute -- http://www.A-A-P.org /// |
|
305 \\\ help me help AIDS victims -- http://ICCF-Holland.org /// |