Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 18 Sep 2012 08:28:24 -0700
From:      Garrett Cooper <yanegomi@gmail.com>
To:        David Wolfskill <david@catwhisker.org>
Cc:        Jim Harris <jimharris@freebsd.org>, "current@freebsd.org" <current@freebsd.org>
Subject:   Re: buildworld broke in sbin/nvmecontrol; r240620 suspected
Message-ID:  <7BCCAFEA-693E-479A-B1BD-AAA625164DCC@gmail.com>
In-Reply-To: <20120918125303.GN3357@albert.catwhisker.org>
References:  <20120918125303.GN3357@albert.catwhisker.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sep 18, 2012, at 5:53 AM, David Wolfskill <david@catwhisker.org> wrote:

> This was on:
>=20
> FreeBSD g1-227.catwhisker.org 10.0-CURRENT FreeBSD 10.0-CURRENT #681 24059=
7M: Mon Sep 17 15:34:41 PDT 2012     root@d134.dwolf.juniper.net.:/usr/obj/u=
sr/src/sys/CANARY  i386
>=20
> using clang as the C compiler:
>=20
> ...
> =3D=3D=3D> sbin/nvmecontrol (all)
> clang -O2 -pipe  -std=3Dgnu99 -Qunused-arguments -fstack-protector -Wsyste=
m-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-pr=
ototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwr=
ite-strings -Wswitch -Wshadow -Wunused-parameter -Wcast-align -Wchar-subscri=
pts -Winline -Wnested-externs -Wredundant-decls -Wold-style-definition -Wno-=
pointer-sign -Wno-empty-body -Wno-string-plus-int -c /usr/src/sbin/nvmecontr=
ol/nvmecontrol.c
> /usr/src/sbin/nvmecontrol/nvmecontrol.c:77:6: error: cast from 'struct nvm=
e_controller_data *' to 'uint32_t *' (aka 'unsigned int *') increases requir=
ed alignment from 1 to 4 [-Werror,-Wcast-align]
>        p =3D (uint32_t *)cdata;
>            ^~~~~~~~~~~~~~~~~
> 1 error generated.
> *** [nvmecontrol.o] Error code 1
> 1 error
> *** [all] Error code 2
> 1 error
> *** [sbin.all__D] Error code 2

Probably should be using memcpy for that.
Thanks!
-Garrett=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?7BCCAFEA-693E-479A-B1BD-AAA625164DCC>