From owner-svn-src-all@freebsd.org Fri Nov 24 05:01:01 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6A562DB9B18; Fri, 24 Nov 2017 05:01:01 +0000 (UTC) (envelope-from imp@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 mx1.freebsd.org (Postfix) with ESMTPS id 36DF165C34; Fri, 24 Nov 2017 05:01:01 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vAO510Xk009619; Fri, 24 Nov 2017 05:01:00 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAO510ON009618; Fri, 24 Nov 2017 05:01:00 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201711240501.vAO510ON009618@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 24 Nov 2017 05:01:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326144 - head/stand/userboot/test X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/stand/userboot/test X-SVN-Commit-Revision: 326144 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: Fri, 24 Nov 2017 05:01:01 -0000 Author: imp Date: Fri Nov 24 05:01:00 2017 New Revision: 326144 URL: https://svnweb.freebsd.org/changeset/base/326144 Log: Mark the func pointer as __dead2. It looks up loader_main, which either aborts or exits, but never returns. Tag it as a non-returning function rather than supply a bogus return(0) at the end of main. CID: 1382885 Sponsored by: Netflix Modified: head/stand/userboot/test/test.c Modified: head/stand/userboot/test/test.c ============================================================================== --- head/stand/userboot/test/test.c Fri Nov 24 05:00:25 2017 (r326143) +++ head/stand/userboot/test/test.c Fri Nov 24 05:01:00 2017 (r326144) @@ -422,7 +422,7 @@ int main(int argc, char** argv) { void *h; - void (*func)(struct loader_callbacks *, void *, int, int); + void (*func)(struct loader_callbacks *, void *, int, int) __dead2; int opt; char *disk_image = NULL; const char *userboot_obj = "/boot/userboot.so";