summaryrefslogtreecommitdiffstats
path: root/source/ap/vim/patches/7.2.185
blob: 35dbad05ed1a465cf335a7ec07b2677a7bcf560a (about) (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
To: vim-dev@vim.org
Subject: Patch 7.2.185
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
------------

Patch 7.2.185
Problem:    Some more compiler warnings when using gcc -Wextra.
Solution:   Add UNUSED and type casts.
Files:	    src/Makefile, src/if_tlc.c, src/if_ruby.c


*** ../vim-7.2.184/src/Makefile	2009-05-21 23:25:47.000000000 +0200
--- src/Makefile	2009-05-22 18:18:44.000000000 +0200
***************
*** 105,112 ****
  # 4. "make test"  {{{1
  #	This is optional.  This will run Vim scripts on a number of test
  #	files, and compare the produced output with the expected output.
! #	If all is well, you will get the "ALL DONE" message in the end.  See
! #	below (search for "/^test").
  #
  # 5. "make install"  {{{1
  #	If the new Vim seems to be working OK you can install it and the
--- 105,112 ----
  # 4. "make test"  {{{1
  #	This is optional.  This will run Vim scripts on a number of test
  #	files, and compare the produced output with the expected output.
! #	If all is well, you will get the "ALL DONE" message in the end.  If a
! #	test fails you get "TEST FAILURE".  See below (search for "/^test").
  #
  # 5. "make install"  {{{1
  #	If the new Vim seems to be working OK you can install it and the
***************
*** 533,538 ****
--- 533,543 ----
  #CFLAGS = -g -DDEBUG -Wall -Wshadow -Wmissing-prototypes
  #CFLAGS = -g -O2 '-DSTARTUPTIME="vimstartup"' -fno-strength-reduce -Wall -Wmissing-prototypes
  
+ # Use this with GCC to check for mistakes, unused arguments, etc.
+ #CFLAGS = -g -Wall -Wextra -Wmissing-prototypes -Wunreachable-code
+ #PYTHON_CFLAGS_EXTRA = -Wno-missing-field-initializers
+ #MZSCHEME_CFLAGS_EXTRA = -Wno-unreachable-code
+ 
  # EFENCE - Electric-Fence malloc debugging: catches memory accesses beyond
  # allocated memory (and makes every malloc()/free() very slow).
  # Electric Fence is free (search ftp sites).
***************
*** 551,562 ****
  # }}}
  
  # LINT - for running lint
! #  For standard lint
! #LINT = lint
! #LINT_OPTIONS = -beprxzF
! #  For splint  (see cleanlint.vim for filtering the output)
! LINT = splint
! LINT_OPTIONS = +unixlib -weak -macrovarprefixexclude -showfunc -linelen 9999
  
  # PROFILING - Uncomment the next two lines to do profiling with gcc and gprof.
  # Might not work with GUI or Perl.
--- 556,568 ----
  # }}}
  
  # LINT - for running lint
! #  For standard Unix lint
! LINT = lint
! LINT_OPTIONS = -beprxzF
! #  For splint
! #  It doesn't work well, crashes on include files and non-ascii characters.
! #LINT = splint
! #LINT_OPTIONS = +unixlib -weak -macrovarprefixexclude -showfunc -linelen 9999
  
  # PROFILING - Uncomment the next two lines to do profiling with gcc and gprof.
  # Might not work with GUI or Perl.
***************
*** 1743,1749 ****
  # messages.  Don't worry about that.
  # If there is a real error, there will be a difference between "test.out" and
  # a "test99.ok" file.
! # If everything is alright, the final message will be "ALL DONE".
  #
  test check:
  	$(MAKE) -f Makefile $(VIMTARGET)
--- 1749,1756 ----
  # messages.  Don't worry about that.
  # If there is a real error, there will be a difference between "test.out" and
  # a "test99.ok" file.
! # If everything is alright, the final message will be "ALL DONE".  If not you
! # get "TEST FAILURE".
  #
  test check:
  	$(MAKE) -f Makefile $(VIMTARGET)
***************
*** 2427,2433 ****
  	$(CCC) -o $@ if_xcmdsrv.c
  
  objects/if_mzsch.o: if_mzsch.c
! 	$(CCC) -o $@ if_mzsch.c
  
  objects/if_perl.o: auto/if_perl.c
  	$(CCC) -o $@ auto/if_perl.c
--- 2434,2440 ----
  	$(CCC) -o $@ if_xcmdsrv.c
  
  objects/if_mzsch.o: if_mzsch.c
! 	$(CCC) -o $@ $(MZSCHEME_CFLAGS_EXTRA) if_mzsch.c
  
  objects/if_perl.o: auto/if_perl.c
  	$(CCC) -o $@ auto/if_perl.c
***************
*** 2436,2442 ****
  	$(CCC) -o $@ if_perlsfio.c
  
  objects/if_python.o: if_python.c
! 	$(CCC) -o $@ if_python.c
  
  objects/if_ruby.o: if_ruby.c
  	$(CCC) -o $@ if_ruby.c
--- 2443,2449 ----
  	$(CCC) -o $@ if_perlsfio.c
  
  objects/if_python.o: if_python.c
! 	$(CCC) -o $@ $(PYTHON_CFLAGS_EXTRA) if_python.c
  
  objects/if_ruby.o: if_ruby.c
  	$(CCC) -o $@ if_ruby.c
*** ../vim-7.2.184/src/if_ruby.c	2007-09-13 15:00:49.000000000 +0200
--- src/if_ruby.c	2009-05-22 15:32:04.000000000 +0200
***************
*** 492,498 ****
      }
  }
  
! static VALUE vim_message(VALUE self, VALUE str)
  {
      char *buff, *p;
  
--- 492,498 ----
      }
  }
  
! static VALUE vim_message(VALUE self UNUSED, VALUE str)
  {
      char *buff, *p;
  
***************
*** 505,524 ****
      return Qnil;
  }
  
! static VALUE vim_set_option(VALUE self, VALUE str)
  {
      do_set((char_u *)STR2CSTR(str), 0);
      update_screen(NOT_VALID);
      return Qnil;
  }
  
! static VALUE vim_command(VALUE self, VALUE str)
  {
      do_cmdline_cmd((char_u *)STR2CSTR(str));
      return Qnil;
  }
  
! static VALUE vim_evaluate(VALUE self, VALUE str)
  {
  #ifdef FEAT_EVAL
      char_u *value = eval_to_string((char_u *)STR2CSTR(str), NULL, TRUE);
--- 505,524 ----
      return Qnil;
  }
  
! static VALUE vim_set_option(VALUE self UNUSED, VALUE str)
  {
      do_set((char_u *)STR2CSTR(str), 0);
      update_screen(NOT_VALID);
      return Qnil;
  }
  
! static VALUE vim_command(VALUE self UNUSED, VALUE str)
  {
      do_cmdline_cmd((char_u *)STR2CSTR(str));
      return Qnil;
  }
  
! static VALUE vim_evaluate(VALUE self UNUSED, VALUE str)
  {
  #ifdef FEAT_EVAL
      char_u *value = eval_to_string((char_u *)STR2CSTR(str), NULL, TRUE);
***************
*** 580,586 ****
      return INT2NUM(n);
  }
  
! static VALUE buffer_s_aref(VALUE self, VALUE num)
  {
      buf_T *b;
      int n = NUM2INT(num);
--- 580,586 ----
      return INT2NUM(n);
  }
  
! static VALUE buffer_s_aref(VALUE self UNUSED, VALUE num)
  {
      buf_T *b;
      int n = NUM2INT(num);
***************
*** 629,635 ****
--- 629,637 ----
  	return line ? rb_str_new2(line) : Qnil;
      }
      rb_raise(rb_eIndexError, "index %d out of buffer", n);
+ #ifndef __GNUC__
      return Qnil; /* For stop warning */
+ #endif
  }
  
  static VALUE buffer_aref(VALUE self, VALUE num)
***************
*** 668,674 ****
--- 670,678 ----
      else
      {
  	rb_raise(rb_eIndexError, "index %d out of buffer", n);
+ #ifndef __GNUC__
  	return Qnil; /* For stop warning */
+ #endif
      }
      return str;
  }
***************
*** 789,795 ****
      return get_buffer_line(curbuf, curwin->w_cursor.lnum);
  }
  
! static VALUE set_current_line(VALUE self, VALUE str)
  {
      return set_buffer_line(curbuf, curwin->w_cursor.lnum, str);
  }
--- 793,799 ----
      return get_buffer_line(curbuf, curwin->w_cursor.lnum);
  }
  
! static VALUE set_current_line(VALUE self UNUSED, VALUE str)
  {
      return set_buffer_line(curbuf, curwin->w_cursor.lnum, str);
  }
***************
*** 815,821 ****
  #endif
  }
  
! static VALUE window_s_aref(VALUE self, VALUE num)
  {
      win_T *w;
      int n = NUM2INT(num);
--- 819,825 ----
  #endif
  }
  
! static VALUE window_s_aref(VALUE self UNUSED, VALUE num)
  {
      win_T *w;
      int n = NUM2INT(num);
***************
*** 897,903 ****
      return Qnil;
  }
  
! static VALUE f_p(int argc, VALUE *argv, VALUE self)
  {
      int i;
      VALUE str = rb_str_new("", 0);
--- 901,907 ----
      return Qnil;
  }
  
! static VALUE f_p(int argc, VALUE *argv, VALUE self UNUSED)
  {
      int i;
      VALUE str = rb_str_new("", 0);
*** ../vim-7.2.184/src/version.c	2009-05-21 23:25:38.000000000 +0200
--- src/version.c	2009-05-22 18:18:58.000000000 +0200
***************
*** 678,679 ****
--- 678,681 ----
  {   /* Add new patch number below this line */
+ /**/
+     185,
  /**/

-- 
BODY:        I'm not dead!
CART DRIVER: 'Ere.  He says he's not dead.
LARGE MAN:   Yes he is.
BODY:        I'm not!
                 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\        download, build and distribute -- http://www.A-A-P.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///