Problem: Arguments of semsg() and siemsg() are not checked.
Solution: Add function prototype with __attribute__.
return TRUE; /* no error messages at the moment */
}
+#ifndef PROTO // manual proto with __attribute__
/*
* Print an error message with format string and variable arguments.
* Note: caller must not pass 'IObuff' as 1st argument.
}
return TRUE; /* no error messages at the moment */
}
+#endif
/*
* Same as emsg(...), but abort on error when ABORT_ON_INTERNAL_ERROR is
#endif
}
+#ifndef PROTO // manual proto with __attribute__
/*
* Same as semsg(...) but abort on error when ABORT_ON_INTERNAL_ERROR is
* defined. It is used for internal errors only, so that they can be
va_end(ap);
emsg_core(IObuff);
}
-#ifdef ABORT_ON_INTERNAL_ERROR
+# ifdef ABORT_ON_INTERNAL_ERROR
abort();
-#endif
+# endif
}
+#endif
/*
* Give an "Internal error" message.
#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
void ignore_error_for_testing(char_u *error);
void do_perror(char *msg);
int emsg(char *s);
-int semsg(const char *s, ...);
void iemsg(char *s);
-void siemsg(const char *s, ...);
void internal_error(char *where);
void emsg_invreg(int name);
char *msg_trunc_attr(char *s, int force, int attr);
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 954,
/**/
953,
/**/