4 From: Bram Moolenaar <Bram@moolenaar.net>
6 Content-Type: text/plain; charset=ISO-8859-1
7 Content-Transfer-Encoding: 8bit
10 Patch 7.2.057 (after 7.2.056)
11 Problem: Combination of int and size_t may not work.
12 Solution: Use size_t for variable.
16 *** ../vim-7.2.056/src/spell.c Sat Nov 29 20:10:59 2008
17 --- src/spell.c Sat Nov 29 20:15:43 2008
23 ! int fwv = 1; /* collect return value of fwrite() to avoid
24 warnings from picky compiler */
26 fd = mch_fopen((char *)fname, "w");
31 ! size_t fwv = 1; /* collect return value of fwrite() to avoid
32 warnings from picky compiler */
34 fd = mch_fopen((char *)fname, "w");
38 /* <HEADER>: <fileID> <versionnr> */
40 fwv &= fwrite(VIMSPELLMAGIC, VIMSPELLMAGICL, (size_t)1, fd);
41 + if (fwv != (size_t)1)
42 + /* Catch first write error, don't try writing more. */
45 putc(VIMSPELLVERSION, fd); /* <versionnr> */
50 /* Write another byte to check for errors (file system full). */
51 if (putc(0, fd) == EOF)
54 if (fclose(fd) == EOF)
62 /* Write another byte to check for errors (file system full). */
63 if (putc(0, fd) == EOF)
66 if (fclose(fd) == EOF)
69 ! if (fwv != (size_t)1)
78 ! int x = 1; /* collect return value of fwrite() */
81 put_bytes(fd, (long_u)gap->ga_len, 2); /* <prefcondcnt> */
86 ! size_t x = 1; /* collect return value of fwrite() */
89 put_bytes(fd, (long_u)gap->ga_len, 2); /* <prefcondcnt> */
90 *** ../vim-7.2.056/src/version.c Sat Nov 29 20:10:59 2008
91 --- src/version.c Sat Nov 29 20:13:46 2008
95 { /* Add new patch number below this line */
101 GUARD #1: What -- a swallow carrying a coconut?
102 ARTHUR: It could grip it by the husk!
103 GUARD #1: It's not a question of where he grips it! It's a simple question
104 of weight ratios! A five ounce bird could not carry a 1 pound
106 The Quest for the Holy Grail (Monty Python)
108 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
109 /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
110 \\\ download, build and distribute -- http://www.A-A-P.org ///
111 \\\ help me help AIDS victims -- http://ICCF-Holland.org ///