Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 01 Oct 2017 14:47:49 -0600
From:      Ian Lepore <ian@freebsd.org>
To:        "O. Hartmann" <ohartmann@walstatt.org>, Andriy Gapon <avg@FreeBSD.org>
Cc:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r324178 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/lua
Message-ID:  <1506890869.22078.45.camel@freebsd.org>
In-Reply-To: <20171001223707.574cde55@thor.intern.walstatt.dynvpn.de>
References:  <201710012012.v91KCUvU024559@repo.freebsd.org> <20171001223707.574cde55@thor.intern.walstatt.dynvpn.de>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 2017-10-01 at 22:37 +0200, O. Hartmann wrote:
> Am Sun, 1 Oct 2017 20:12:30 +0000 (UTC)
> Andriy Gapon <avg@FreeBSD.org> schrieb:
> 
> > 
> > Author: avg
> > Date: Sun Oct  1 20:12:30 2017
> > New Revision: 324178
> > URL: https://svnweb.freebsd.org/changeset/base/324178
> > 
> > Log:
> >   unbreak kernel builds on sparc64 and powerpc after r324163, ZFS
> > Channel Programs
> >   
> >   The custom iscntrl() in ZFS Lua code expects a signed argumnet,
> > so
> >   remove the harmful cast.
> >   
> >   Reported by:	ian
> >   MFC after:	5 weeks
> >   X-MFC with:	r324163
> > 
> > Modified:
> >   head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/lua/lstrlib.c
> > 
> > Modified:
> > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/lua/lstrlib.c
> > ===================================================================
> > ===========
> > ---
> > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/lua/lstrlib.c	
> > Sun Oct  1
> > 19:52:47 2017	(r324177) +++
> > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/lua/lstrlib.c	
> > Sun Oct  1
> > 20:12:30 2017	(r324178) @@ -867,7 +867,7 @@ static void
> > addquoted (lua_State *L,
> > luaL_Buffer *b, i luaL_addchar(b, '\\'); luaL_addchar(b, *s);
> >      }
> > -    else if (*s == '\0' || iscntrl(uchar(*s))) {
> > +    else if (*s == '\0' || iscntrl(*s)) {
> >        char buff[10];
> >        if (!isdigit(uchar(*(s+1))))
> >          sprintf(buff, "\\%d", (int)uchar(*s));
> > _______________________________________________
> > svn-src-head@freebsd.org mailing list
> > https://lists.freebsd.org/mailman/listinfo/svn-src-head
> > To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.
> > org"
> The build of world fails for me with the error shown below:
> 
> 
> [...]
> Building /usr/obj/usr/src/cddl/lib/libzpool/lapi.o
> --- lstrlib.o ---
> /usr/src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/lua/lstrlib.c
> :114:12: warning:
> implicitly declaring library function 'tolower' with type 'int
> (int)' [-Wimplicit-function-declaration] p[i] = tolower(uchar(s[i]));
> ^
> /usr/src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/lua/lstrlib.c
> :114:12: note:
> include the header <ctype.h> or explicitly provide a declaration for
> 'tolower'
> /usr/src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/lua/lstrlib.c
> :127:12:
> warning: implicitly declaring library function 'toupper' with type
> 'int
> (int)' [-Wimplicit-function-declaration] p[i] = toupper(uchar(s[i]));
> 
> 

Also, removing the cast won't really be a fix on a platform that has
default unsigned chars (which arm does, but arm doesn't use gcc; not
sure about other platforms).

-- Ian



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1506890869.22078.45.camel>