From b42e8bce3a1d4af3e648dc3675fbb565b579e42c Mon Sep 17 00:00:00 2001 From: Vadim Barkov Date: Wed, 1 Feb 2017 14:03:57 +0000 Subject: [PATCH] Added PNG_UNUSED macro in contrib/powerpc/linux{_aux}.c --- contrib/powerpc-vsx/linux.c | 2 ++ contrib/powerpc-vsx/linux_aux.c | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/contrib/powerpc-vsx/linux.c b/contrib/powerpc-vsx/linux.c index c0a4eca2d..f54f65f59 100644 --- a/contrib/powerpc-vsx/linux.c +++ b/contrib/powerpc-vsx/linux.c @@ -35,6 +35,8 @@ png_have_vsx(png_structp png_ptr) char input[MAXLINE]; char *token = NULL; + PNG_UNUSED(png_ptr) + f = fopen("/proc/cpuinfo", "r"); if (f != NULL) { diff --git a/contrib/powerpc-vsx/linux_aux.c b/contrib/powerpc-vsx/linux_aux.c index c21120cf3..058bb02b3 100644 --- a/contrib/powerpc-vsx/linux_aux.c +++ b/contrib/powerpc-vsx/linux_aux.c @@ -22,7 +22,11 @@ static int png_have_vsx(png_structp png_ptr) { + const unsigned long auxv = getauxval( AT_HWCAP ); + + PNG_UNUSED(png_ptr) + if(auxv & (PPC_FEATURE_HAS_ALTIVEC|PPC_FEATURE_HAS_VSX )) return 1; else -- GitLab