Date: Wed, 24 Jan 2018 07:01:44 +0000 (UTC) From: Eitan Adler <eadler@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r328319 - head/usr.bin/m4 Message-ID: <201801240701.w0O71in5036854@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: eadler Date: Wed Jan 24 07:01:44 2018 New Revision: 328319 URL: https://svnweb.freebsd.org/changeset/base/328319 Log: m4: add annotations to various functions Explain to the compiler that several functions are either noreturn or take printf like arguments Discussed with: swildner@DragonFlyBSD.org Modified: head/usr.bin/m4/extern.h Modified: head/usr.bin/m4/extern.h ============================================================================== --- head/usr.bin/m4/extern.h Wed Jan 24 06:48:42 2018 (r328318) +++ head/usr.bin/m4/extern.h Wed Jan 24 07:01:44 2018 (r328319) @@ -105,16 +105,16 @@ extern void pbnumbase(int, int, int); extern void pbunsigned(unsigned long); extern void pbstr(const char *); extern void pushback(int); -extern void *xalloc(size_t, const char *, ...); -extern void *xcalloc(size_t, size_t, const char *, ...); -extern void *xrealloc(void *, size_t, const char *, ...); -extern void *xreallocarray(void *, size_t, size_t, const char *, ...); +extern void *xalloc(size_t, const char *, ...) __printf0like(2, 3); +extern void *xcalloc(size_t, size_t, const char *, ...) __printf0like(3, 4); +extern void *xrealloc(void *, size_t, const char *, ...) __printf0like(3, 4); +extern void *xreallocarray(void *, size_t, size_t, const char *, ...) __printf0like(4, 5); extern char *xstrdup(const char *); extern void usage(void); extern void resizedivs(int); extern size_t buffer_mark(void); extern void dump_buffer(FILE *, size_t); -extern void m4errx(int, const char *, ...); +extern void m4errx(int, const char *, ...) __dead2 __printf0like(2, 3); extern int obtain_char(struct input_file *); extern void set_input(struct input_file *, FILE *, const char *);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201801240701.w0O71in5036854>