4 From: Bram Moolenaar <Bram@moolenaar.net>
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
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
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
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").
26 # 5. "make install" {{{1
27 # If the new Vim seems to be working OK you can install it and the
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").
35 # 5. "make install" {{{1
36 # If the new Vim seems to be working OK you can install it and the
40 #CFLAGS = -g -DDEBUG -Wall -Wshadow -Wmissing-prototypes
41 #CFLAGS = -g -O2 '-DSTARTUPTIME="vimstartup"' -fno-strength-reduce -Wall -Wmissing-prototypes
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
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).
55 # LINT - for running lint
58 ! #LINT_OPTIONS = -beprxzF
59 ! # For splint (see cleanlint.vim for filtering the output)
61 ! LINT_OPTIONS = +unixlib -weak -macrovarprefixexclude -showfunc -linelen 9999
63 # PROFILING - Uncomment the next two lines to do profiling with gcc and gprof.
64 # Might not work with GUI or Perl.
68 # LINT - for running lint
69 ! # For standard Unix lint
71 ! LINT_OPTIONS = -beprxzF
73 ! # It doesn't work well, crashes on include files and non-ascii characters.
75 ! #LINT_OPTIONS = +unixlib -weak -macrovarprefixexclude -showfunc -linelen 9999
77 # PROFILING - Uncomment the next two lines to do profiling with gcc and gprof.
78 # Might not work with GUI or Perl.
81 # messages. Don't worry about that.
82 # If there is a real error, there will be a difference between "test.out" and
84 ! # If everything is alright, the final message will be "ALL DONE".
87 $(MAKE) -f Makefile $(VIMTARGET)
89 # messages. Don't worry about that.
90 # If there is a real error, there will be a difference between "test.out" and
92 ! # If everything is alright, the final message will be "ALL DONE". If not you
93 ! # get "TEST FAILURE".
96 $(MAKE) -f Makefile $(VIMTARGET)
99 $(CCC) -o $@ if_xcmdsrv.c
101 objects/if_mzsch.o: if_mzsch.c
102 ! $(CCC) -o $@ if_mzsch.c
104 objects/if_perl.o: auto/if_perl.c
105 $(CCC) -o $@ auto/if_perl.c
107 $(CCC) -o $@ if_xcmdsrv.c
109 objects/if_mzsch.o: if_mzsch.c
110 ! $(CCC) -o $@ $(MZSCHEME_CFLAGS_EXTRA) if_mzsch.c
112 objects/if_perl.o: auto/if_perl.c
113 $(CCC) -o $@ auto/if_perl.c
116 $(CCC) -o $@ if_perlsfio.c
118 objects/if_python.o: if_python.c
119 ! $(CCC) -o $@ if_python.c
121 objects/if_ruby.o: if_ruby.c
122 $(CCC) -o $@ if_ruby.c
124 $(CCC) -o $@ if_perlsfio.c
126 objects/if_python.o: if_python.c
127 ! $(CCC) -o $@ $(PYTHON_CFLAGS_EXTRA) if_python.c
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
138 ! static VALUE vim_message(VALUE self, VALUE str)
146 ! static VALUE vim_message(VALUE self UNUSED, VALUE str)
155 ! static VALUE vim_set_option(VALUE self, VALUE str)
157 do_set((char_u *)STR2CSTR(str), 0);
158 update_screen(NOT_VALID);
162 ! static VALUE vim_command(VALUE self, VALUE str)
164 do_cmdline_cmd((char_u *)STR2CSTR(str));
168 ! static VALUE vim_evaluate(VALUE self, VALUE str)
171 char_u *value = eval_to_string((char_u *)STR2CSTR(str), NULL, TRUE);
176 ! static VALUE vim_set_option(VALUE self UNUSED, VALUE str)
178 do_set((char_u *)STR2CSTR(str), 0);
179 update_screen(NOT_VALID);
183 ! static VALUE vim_command(VALUE self UNUSED, VALUE str)
185 do_cmdline_cmd((char_u *)STR2CSTR(str));
189 ! static VALUE vim_evaluate(VALUE self UNUSED, VALUE str)
192 char_u *value = eval_to_string((char_u *)STR2CSTR(str), NULL, TRUE);
198 ! static VALUE buffer_s_aref(VALUE self, VALUE num)
201 int n = NUM2INT(num);
206 ! static VALUE buffer_s_aref(VALUE self UNUSED, VALUE num)
209 int n = NUM2INT(num);
213 return line ? rb_str_new2(line) : Qnil;
215 rb_raise(rb_eIndexError, "index %d out of buffer", n);
217 return Qnil; /* For stop warning */
221 static VALUE buffer_aref(VALUE self, VALUE num)
227 rb_raise(rb_eIndexError, "index %d out of buffer", n);
229 return Qnil; /* For stop warning */
236 return get_buffer_line(curbuf, curwin->w_cursor.lnum);
239 ! static VALUE set_current_line(VALUE self, VALUE str)
241 return set_buffer_line(curbuf, curwin->w_cursor.lnum, str);
244 return get_buffer_line(curbuf, curwin->w_cursor.lnum);
247 ! static VALUE set_current_line(VALUE self UNUSED, VALUE str)
249 return set_buffer_line(curbuf, curwin->w_cursor.lnum, str);
256 ! static VALUE window_s_aref(VALUE self, VALUE num)
259 int n = NUM2INT(num);
264 ! static VALUE window_s_aref(VALUE self UNUSED, VALUE num)
267 int n = NUM2INT(num);
273 ! static VALUE f_p(int argc, VALUE *argv, VALUE self)
276 VALUE str = rb_str_new("", 0);
281 ! static VALUE f_p(int argc, VALUE *argv, VALUE self UNUSED)
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
290 { /* Add new patch number below this line */
297 CART DRIVER: 'Ere. He says he's not dead.
298 LARGE MAN: Yes he is.
300 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
302 /// Bram Moolenaar -- Bram@Moolenaar.net -- 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 ///