Re: Casting 0 to a __bitwise type

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Feb 14, 2017 at 09:36:40PM +0000, Edward Cree wrote:
> I'm given to understand that bitwise types consider 0 'special', in that
>  sparse will allow, say:
>         typedef __u32 __bitwise __be32;
>         __be32 value = 0;
> However, it appears that if I try to cast a constant 0 to a bitwise type,
>         static inline void ip6_fill_mask(__be32 *mask)
>         {
>                 mask[0] = mask[1] = mask[2] = mask[3] = ~(__be32)0;
>         }
> sparse complains "warning: cast to restricted __be32".

I can't reproduce this with the current head.
Wich version of sparse are you using? Can you retry with sparse's head?


Luc Van Oostenryck
--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux