summaryrefslogtreecommitdiff
path: root/src/proto.h
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-02-19 21:34:05 +0100
committerBram Moolenaar <Bram@vim.org>2019-02-19 21:34:05 +0100
commit0d8562a9992e94d532485c37268ca33c0c49ecc2 (patch)
treea91ad1f6f9aef842d1a9cfaa2c8e604de9dce3ce /src/proto.h
parentc9629251a634d4f5988c8162ba8249026d1af687 (diff)
downloadvim-git-0d8562a9992e94d532485c37268ca33c0c49ecc2.tar.gz
patch 8.1.0954: arguments of semsg() and siemsg() are not checkedv8.1.0954
Problem: Arguments of semsg() and siemsg() are not checked. Solution: Add function prototype with __attribute__.
Diffstat (limited to 'src/proto.h')
-rw-r--r--src/proto.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/proto.h b/src/proto.h
index 43192ffd5..4a5977f60 100644
--- a/src/proto.h
+++ b/src/proto.h
@@ -134,6 +134,28 @@ smsg_attr_keep(int, const char *, ...)
#endif
;
+/* These prototypes cannot be produced automatically. */
+int
+# ifdef __BORLANDC__
+_RTLENTRYF
+# endif
+semsg(const char *, ...)
+#ifdef USE_PRINTF_FORMAT_ATTRIBUTE
+ __attribute__((format(printf, 1, 0)))
+#endif
+ ;
+
+/* These prototypes cannot be produced automatically. */
+void
+# ifdef __BORLANDC__
+_RTLENTRYF
+# endif
+siemsg(const char *, ...)
+#ifdef USE_PRINTF_FORMAT_ATTRIBUTE
+ __attribute__((format(printf, 1, 0)))
+#endif
+ ;
+
int
# ifdef __BORLANDC__
_RTLENTRYF