patch 8.1.0954: arguments of semsg() and siemsg() are not checked
Problem: Arguments of semsg() and siemsg() are not checked.
Solution: Add function prototype with __attribute__.
diff --git a/src/proto.h b/src/proto.h
index 43192ff..4a5977f 100644
--- a/src/proto.h
+++ b/src/proto.h
@@ -134,6 +134,28 @@
#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