AltiVec: Disable/Fix some strict compiler warnings

We use a standard set of strict compiler warnings with Clang and GCC to
continuously test and maintain C89 conformance in the libjpeg API code.
However, SIMD extensions need not comply with that.  The AltiVec code
specifically uses some C99isms, so disable -Wc99-extensions and
-Wpedantic in the scope of that code.  Also disable -Wshadow, because
I'm too lazy to fix the TRANSPOSE() macro.  Also
use #ifdef __BIG_ENDIAN__ and #if defined(__BIG_ENDIAN__) instead
of #if __BIG_ENDIAN__
This commit is contained in:
DRC
2024-12-12 00:09:34 +00:00
committed by DRC
parent ab56b9841c
commit 1c864a9d15
10 changed files with 49 additions and 40 deletions

View File

@@ -1,7 +1,7 @@
/*
* AltiVec optimizations for libjpeg-turbo
*
* Copyright (C) 2014-2015, D. R. Commander. All Rights Reserved.
* Copyright (C) 2014-2015, 2024, D. R. Commander. All Rights Reserved.
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
@@ -127,12 +127,12 @@ void jsimd_idct_ifast_altivec(void *dct_table_, JCOEFPTR coef_block,
__vector short pw_zero = { __8X(0) },
pw_F1414 = { __8X(F_1_414 << CONST_SHIFT) },
pw_F1847 = { __8X(F_1_847 << CONST_SHIFT) },
pw_MF1613 = { __8X(-F_1_613 << CONST_SHIFT) },
pw_MF1613 = { __8X((short)((unsigned short)(-F_1_613) << CONST_SHIFT)) },
pw_F1082 = { __8X(F_1_082 << CONST_SHIFT) };
__vector unsigned short
pre_multiply_scale_bits = { __8X(PRE_MULTIPLY_SCALE_BITS) },
pass1_bits3 = { __8X(PASS1_BITS + 3) };
__vector signed char pb_centerjsamp = { __16X(CENTERJSAMPLE) };
__vector signed char pb_centerjsamp = { __16X((signed char)CENTERJSAMPLE) };
/* Pass 1: process columns */