Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[libpng16] arm: Use
png_aligncastconst
for an upcast in Neon intrin…
…sics This changes the arm/palette_neon_intrinsics.c code from using a bare cast to using the portable macro `png_aligncastconst`. This removes the `-Wcast-align` warning. The cast is safe because the pointer was allocated by `malloc(1024)`, and `malloc` is required to return a pointer with sufficient alignment for anything the allocation can accomodate. Nevertheless, this is a quick and dirty fix; the use of `png_bytep` in the `png_struct` declaration of the pointer is machine-specific. Other architectures may need different types and, consequently, the only type which is portable to other companies' CPUs is `(void*)`. This is a cherry-pick of commit a604b12 from branch 'libpng18'. Reviewed-by: Cosmin Truta <ctruta@gmail.com> Signed-off-by: John Bowler <jbowler@acm.org> Signed-off-by: Cosmin Truta <ctruta@gmail.com>
- Loading branch information