comparison src/ex_docmd.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 da8b98c008bf
children 41fbbcea0f1b
comparison
equal deleted inserted replaced
15489:3bbefd5c9d0d 15490:98c35d312987
1345 } 1345 }
1346 while (messages != NULL); 1346 while (messages != NULL);
1347 } 1347 }
1348 else if (p != NULL) 1348 else if (p != NULL)
1349 { 1349 {
1350 semsg(p); 1350 emsg(p);
1351 vim_free(p); 1351 vim_free(p);
1352 } 1352 }
1353 vim_free(sourcing_name); 1353 vim_free(sourcing_name);
1354 sourcing_name = saved_sourcing_name; 1354 sourcing_name = saved_sourcing_name;
1355 sourcing_lnum = saved_sourcing_lnum; 1355 sourcing_lnum = saved_sourcing_lnum;
5786 if (vim_dialog_yesno(VIM_QUESTION, NULL, buff, 1) == VIM_YES) 5786 if (vim_dialog_yesno(VIM_QUESTION, NULL, buff, 1) == VIM_YES)
5787 return OK; 5787 return OK;
5788 return FAIL; 5788 return FAIL;
5789 } 5789 }
5790 #endif 5790 #endif
5791 semsg(NGETTEXT("E173: %ld more file to edit", 5791 semsg(NGETTEXT("E173: %d more file to edit",
5792 "E173: %ld more files to edit", n), n); 5792 "E173: %d more files to edit", n), n);
5793 quitmore = 2; /* next try to quit is allowed */ 5793 quitmore = 2; /* next try to quit is allowed */
5794 } 5794 }
5795 return FAIL; 5795 return FAIL;
5796 } 5796 }
5797 return OK; 5797 return OK;
6956 p = ksp + 3; 6956 p = ksp + 3;
6957 continue; 6957 continue;
6958 } 6958 }
6959 } 6959 }
6960 6960
6961 /* break if there no <item> is found */ 6961 /* break if no <item> is found */
6962 if (start == NULL || end == NULL) 6962 if (start == NULL || end == NULL)
6963 break; 6963 break;
6964 6964
6965 /* Include the '>' */ 6965 /* Include the '>' */
6966 ++end; 6966 ++end;
8020 } 8020 }
8021 8021
8022 /* 8022 /*
8023 * Handle a file drop. The code is here because a drop is *nearly* like an 8023 * Handle a file drop. The code is here because a drop is *nearly* like an
8024 * :args command, but not quite (we have a list of exact filenames, so we 8024 * :args command, but not quite (we have a list of exact filenames, so we
8025 * don't want to (a) parse a command line, or (b) expand wildcards. So the 8025 * don't want to (a) parse a command line, or (b) expand wildcards). So the
8026 * code is very similar to :args and hence needs access to a lot of the static 8026 * code is very similar to :args and hence needs access to a lot of the static
8027 * functions in this file. 8027 * functions in this file.
8028 * 8028 *
8029 * The "filev" list must have been allocated using alloc(), as should each item 8029 * The "filev" list must have been allocated using alloc(), as should each item
8030 * in the list. This function takes over responsibility for freeing the "filev" 8030 * in the list. This function takes over responsibility for freeing the "filev"