[Libreoffice-commits] core.git: Silence some conversion warnings
Stephan Bergmann
sbergman at redhat.com
Mon Aug 24 01:37:38 PDT 2015
On 08/21/2015 10:30 PM, Matteo Casalin wrote:
> commit eb4cbea657b9038c488f1b1bcf5107cc226a6681
> Author: Matteo Casalin <matteo.casalin at yahoo.com>
> Date: Sun Aug 16 16:32:13 2015 +0200
>
> Silence some conversion warnings
>
> Change-Id: I676ed010576f3a24b193ffc6c28a319bcc5ac968
>
[...]
> diff --git a/store/source/storbase.hxx b/store/source/storbase.hxx
> index 395870f..78a51a1 100644
> --- a/store/source/storbase.hxx
> +++ b/store/source/storbase.hxx
> @@ -512,9 +512,9 @@ struct PageData
> void guard (sal_uInt32 nAddr)
> {
> sal_uInt32 nCRC32 = 0;
> - nCRC32 = rtl_crc32 (nCRC32, &m_aGuard.m_nMagic, sizeof(sal_uInt32));
> + nCRC32 = rtl_crc32 (nCRC32, &m_aGuard.m_nMagic, static_cast<sal_uInt32>(sizeof(sal_uInt32)));
What compiler/switch is it that warns there? It does not look like that
particular compiler/switch is very useful. sizeof(sal_uInt32) is a
known, small integer at compile time. It should be apparent to both the
compiler and humans that it fits into the sal_uInt32 argument to
rtl_crc32 without needing the static_cast noise.
More information about the LibreOffice
mailing list