lua-users home
lua-l archive

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


Roberto Ierusalimschy <roberto@inf.puc-rio.br> writes:

> Do you know how to remove these warnings? Maybe an extra cast to
> unsigned?
>
> -   if ((unsigned int)i == -(unsigned int)i)
> +   if ((unsigned int)i == (unsigned int)(-(unsigned int)i))
>
> Or maybe this?
>
> +   if ((unsigned int)i == (0 - (unsigned int)i))

  if (i == 0U - i)

-- 
David Kastrup