comparison src/proto.h @ 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 41fbbcea0f1b
comparison
equal deleted inserted replaced
15489:3bbefd5c9d0d 15490:98c35d312987
106 /* These prototypes cannot be produced automatically. */ 106 /* These prototypes cannot be produced automatically. */
107 int 107 int
108 # ifdef __BORLANDC__ 108 # ifdef __BORLANDC__
109 _RTLENTRYF 109 _RTLENTRYF
110 # endif 110 # endif
111 smsg(const char *, ...); 111 smsg(const char *, ...)
112 112 #ifdef USE_PRINTF_FORMAT_ATTRIBUTE
113 int 113 __attribute__((format(printf, 1, 0)))
114 # ifdef __BORLANDC__ 114 #endif
115 _RTLENTRYF 115 ;
116 # endif 116
117 smsg_attr(int, const char *, ...); 117 int
118 118 # ifdef __BORLANDC__
119 int 119 _RTLENTRYF
120 # ifdef __BORLANDC__ 120 # endif
121 _RTLENTRYF 121 smsg_attr(int, const char *, ...)
122 # endif 122 #ifdef USE_PRINTF_FORMAT_ATTRIBUTE
123 smsg_attr_keep(int, const char *, ...); 123 __attribute__((format(printf, 2, 3)))
124 #endif
125 ;
126
127 int
128 # ifdef __BORLANDC__
129 _RTLENTRYF
130 # endif
131 smsg_attr_keep(int, const char *, ...)
132 #ifdef USE_PRINTF_FORMAT_ATTRIBUTE
133 __attribute__((format(printf, 2, 3)))
134 #endif
135 ;
124 136
125 int 137 int
126 # ifdef __BORLANDC__ 138 # ifdef __BORLANDC__
127 _RTLENTRYF 139 _RTLENTRYF
128 # endif 140 # endif