Date: Tue, 1 Aug 2017 09:39:08 +0300 From: Andriy Gapon <avg@FreeBSD.org> To: Ngie Cooper <ngie@FreeBSD.org>, src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org Subject: Re: svn commit: r321849 - in head/tools/tools: bootparttest zfsboottest Message-ID: <f27860f2-9835-8bbb-7066-d36f45917e36@FreeBSD.org> In-Reply-To: <201708010529.v715Ta2p047371@repo.freebsd.org> References: <201708010529.v715Ta2p047371@repo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On 01/08/2017 08:29, Ngie Cooper wrote: > Author: ngie > Date: Tue Aug 1 05:29:36 2017 > New Revision: 321849 > URL: https://svnweb.freebsd.org/changeset/base/321849 > > Log: > Fix the return type for pager_output(..) in bootparttest and zfsboottest > > pager_output(..) has always returned int. For some reason (probably the > clang 5.0 update), this mismatch now results in an error with CC=clang. > > MFC after: 1 week I am not sure if this a correct fix... Return value of pager_output() signifies whether to continue printing, return value of printf is a number of characters printed. > head/tools/tools/bootparttest/stub.c > head/tools/tools/zfsboottest/zfsboottest.c > > Modified: head/tools/tools/bootparttest/stub.c > ============================================================================== > --- head/tools/tools/bootparttest/stub.c Tue Aug 1 05:26:45 2017 (r321848) > +++ head/tools/tools/bootparttest/stub.c Tue Aug 1 05:29:36 2017 (r321849) > @@ -44,9 +44,9 @@ Free(void *ptr, const char *file, int line) > return (free(ptr)); > } > > -void > +int > pager_output(const char *s) > { > > - printf("%s", s); > + return (printf("%s", s)); > } > > Modified: head/tools/tools/zfsboottest/zfsboottest.c > ============================================================================== > --- head/tools/tools/zfsboottest/zfsboottest.c Tue Aug 1 05:26:45 2017 (r321848) > +++ head/tools/tools/zfsboottest/zfsboottest.c Tue Aug 1 05:29:36 2017 (r321849) > @@ -43,11 +43,11 @@ > > #define NBBY 8 > > -void > +int > pager_output(const char *line) > { > > - fprintf(stderr, "%s", line); > + return (fprintf(stderr, "%s", line)); > } > > #define ZFS_TEST > -- Andriy Gapon
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?f27860f2-9835-8bbb-7066-d36f45917e36>