From owner-svn-src-all@freebsd.org Wed Jan 24 07:01:45 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 314B2EC29B3; Wed, 24 Jan 2018 07:01:45 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DB9BA7AFDB; Wed, 24 Jan 2018 07:01:44 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D69161A55B; Wed, 24 Jan 2018 07:01:44 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w0O71iRe036855; Wed, 24 Jan 2018 07:01:44 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w0O71in5036854; Wed, 24 Jan 2018 07:01:44 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201801240701.w0O71in5036854@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Wed, 24 Jan 2018 07:01:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r328319 - head/usr.bin/m4 X-SVN-Group: head X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: head/usr.bin/m4 X-SVN-Commit-Revision: 328319 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Jan 2018 07:01:45 -0000 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 *);