Date: Fri, 03 Feb 2017 18:52:45 +0200 From: Toomas Soome <tsoome@me.com> To: Ian Lepore <ian@freebsd.org> Cc: Toomas Soome <tsoome@FreeBSD.org>, src-committers <src-committers@freebsd.org>, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r313166 - head/sys/boot/efi/libefi Message-ID: <19994E26-42EE-4E12-9867-1E53FA2A7F81@me.com> In-Reply-To: <1486140447.3017.189.camel@freebsd.org> References: <201702031639.v13GdAXQ074031@repo.freebsd.org> <1486140447.3017.189.camel@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
> On 3. veebr 2017, at 18:47, Ian Lepore <ian@freebsd.org> wrote: >=20 > On Fri, 2017-02-03 at 16:39 +0000, Toomas Soome wrote: >> Author: tsoome >> Date: Fri Feb 3 16:39:10 2017 >> New Revision: 313166 >> URL: https://svnweb.freebsd.org/changeset/base/313166 >>=20 >> Log: >> loader: libefi/env.c warnings in arm build >> =20 >> The arm build has revealed some of the warnings, the fix for CHAR16 >> warning is to switch the warning off for env.c (same as for >> efinet.c). >> =20 >=20 > How is disabling the warning instead of just fixing it the right thing > to do? I think disabling a printf format warning is never the right > thing to do, it just turns a compile warning into a runtime failure. I would love to see the correct fix - as all UEFI chars are 2 byte; but = thats up to arm experts. I just do not know the details why the arm is = stuck with 4 byte wchar_t there - Im sure they do not have this just for = fun:) rgds, toomas >=20 > -- Ian >=20 >> For error code we need to use macro. >> =20 >> Reported by: gjb >> Reviewed by: imp >> Approved by: imp (mentor) >> Differential Revision: https://reviews.freebsd.org/D9422 >>=20 >> Modified: >> head/sys/boot/efi/libefi/Makefile >> head/sys/boot/efi/libefi/env.c >>=20 >> Modified: head/sys/boot/efi/libefi/Makefile >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >> =3D=3D=3D=3D=3D=3D=3D=3D=3D >> --- head/sys/boot/efi/libefi/Makefile Fri Feb 3 16:36:14 2017 >> (r313165) >> +++ head/sys/boot/efi/libefi/Makefile Fri Feb 3 16:39:10 2017 >> (r313166) >> @@ -26,6 +26,7 @@ SRCS+=3D time_event.c >> # of a short. There's no good cast to use here so just ignore the >> # warnings for now. >> CWARNFLAGS.efinet.c+=3D -Wno-format >> +CWARNFLAGS.env.c+=3D -Wno-format >> =20 >> .if ${MACHINE_CPUARCH} =3D=3D "aarch64" >> CFLAGS+=3D -msoft-float -mgeneral-regs-only >>=20 >> Modified: head/sys/boot/efi/libefi/env.c >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >> =3D=3D=3D=3D=3D=3D=3D=3D=3D >> --- head/sys/boot/efi/libefi/env.c Fri Feb 3 16:36:14 2017=09 >> (r313165) >> +++ head/sys/boot/efi/libefi/env.c Fri Feb 3 16:39:10 2017=09 >> (r313166) >> @@ -94,14 +94,16 @@ efi_print_var(CHAR16 *varnamearg, EFI_GU >> status =3D RS->GetVariable(varnamearg, matchguid, &attr, >> &datasz, NULL); >> if (status !=3D EFI_BUFFER_TOO_SMALL) { >> - printf("Can't get the variable: error %#lx\n", >> status); >> + printf("Can't get the variable: error %#lx\n", >> + EFI_ERROR_CODE(status)); >> return (CMD_ERROR); >> } >> data =3D malloc(datasz); >> status =3D RS->GetVariable(varnamearg, matchguid, &attr, >> &datasz, data); >> if (status !=3D EFI_SUCCESS) { >> - printf("Can't get the variable: error %#lx\n", >> status); >> + printf("Can't get the variable: error %#lx\n", >> + EFI_ERROR_CODE(status)); >> return (CMD_ERROR); >> } >> uuid_to_string((uuid_t *)matchguid, &str, &uuid_status); >>=20
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19994E26-42EE-4E12-9867-1E53FA2A7F81>