comparison src/spellfile.c @ 15490:98c35d312987 v8.1.0753

patch 8.1.0753: printf format not checked for semsg() commit https://github.com/vim/vim/commit/b5443cc46dd1485d6c785dd8c65a2c07bd5a17f3 Author: Bram Moolenaar <Bram@vim.org> Date: Tue Jan 15 20:19:40 2019 +0100 patch 8.1.0753: printf format not checked for semsg() Problem: printf format not checked for semsg(). Solution: Add GNUC attribute and fix reported problems. (Dominique Pelle, closes #3805)
author Bram Moolenaar <Bram@vim.org>
date Tue, 15 Jan 2019 20:30:07 +0100
parents 55ccc2d353bd
children dd725a8ab112
comparison
equal deleted inserted replaced
15489:3bbefd5c9d0d 15490:98c35d312987
6012 if (incount <= 0) 6012 if (incount <= 0)
6013 emsg(_(e_invarg)); /* need at least output and input names */ 6013 emsg(_(e_invarg)); /* need at least output and input names */
6014 else if (vim_strchr(gettail(wfname), '_') != NULL) 6014 else if (vim_strchr(gettail(wfname), '_') != NULL)
6015 emsg(_("E751: Output file name must not have region name")); 6015 emsg(_("E751: Output file name must not have region name"));
6016 else if (incount > MAXREGIONS) 6016 else if (incount > MAXREGIONS)
6017 semsg(_("E754: Only up to %ld regions supported"), MAXREGIONS); 6017 semsg(_("E754: Only up to %d regions supported"), MAXREGIONS);
6018 else 6018 else
6019 { 6019 {
6020 /* Check for overwriting before doing things that may take a lot of 6020 /* Check for overwriting before doing things that may take a lot of
6021 * time. */ 6021 * time. */
6022 if (!over_write && mch_stat((char *)wfname, &st) >= 0) 6022 if (!over_write && mch_stat((char *)wfname, &st) >= 0)
6272 copy_option_part(&spf, fnamebuf, MAXPATHL, ","); 6272 copy_option_part(&spf, fnamebuf, MAXPATHL, ",");
6273 if (i == idx) 6273 if (i == idx)
6274 break; 6274 break;
6275 if (*spf == NUL) 6275 if (*spf == NUL)
6276 { 6276 {
6277 semsg(_("E765: 'spellfile' does not have %ld entries"), idx); 6277 semsg(_("E765: 'spellfile' does not have %d entries"), idx);
6278 vim_free(fnamebuf); 6278 vim_free(fnamebuf);
6279 return; 6279 return;
6280 } 6280 }
6281 } 6281 }
6282 6282