Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 18 Sep 2012 19:01:35 +0200
From:      Dimitry Andric <dim@FreeBSD.org>
To:        David Wolfskill <david@catwhisker.org>
Cc:        Jim Harris <jimharris@freebsd.org>, current@freebsd.org
Subject:   Re: buildworld broke in sbin/nvmecontrol; r240620 suspected
Message-ID:  <5058A8EF.8060001@FreeBSD.org>
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 2012-09-18 14:53, David Wolfskill wrote:
...
> using clang as the C compiler:
>
> ...
> ===> sbin/nvmecontrol (all)
> clang -O2 -pipe  -std=gnu99 -Qunused-arguments -fstack-protector -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wunused-parameter -Wcast-align -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -Wold-style-definition -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int -c /usr/src/sbin/nvmecontrol/nvmecontrol.c
> /usr/src/sbin/nvmecontrol/nvmecontrol.c:77:6: error: cast from 'struct nvme_controller_data *' to 'uint32_t *' (aka 'unsigned int *') increases required alignment from 1 to 4 [-Werror,-Wcast-align]
>          p = (uint32_t *)cdata;
>              ^~~~~~~~~~~~~~~~~

Since this tool (nvmecontrol) is currently only compiled for amd64 and
i386, we might as well ignore these alignment warnings, or cast them
away.

Jim, I don't expect this tool to ever be applicable to non-x86 arches,
but can you please confirm that?



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