Fixed gcc strict prototype and other build errors #611
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
While building CNDP project (https://github.com/CloudNativeDataPlane/cndp) along with sse2neon.h on aarch64 architecture on Ubuntu 18.04.6 LTS the following build errors were encountered:
../lib/core/arm/sse2neon.h:547:1: error: function declaration isn't a prototype [-Werror=strict-prototypes]
FORCE_INLINE unsigned int _MM_GET_ROUNDING_MODE();
^~~~~~~~~~~~
../lib/core/arm/sse2neon.h:563:1: error: function declaration isn't a prototype [-Werror=strict-prototypes]
FORCE_INLINE __m128i _mm_setzero_si128();
^~~~~~~~~~~~
../lib/core/arm/sse2neon.h:1761:23: error: function declaration isn't a prototype [-Werror=strict-prototypes]
FORCE_INLINE uint64_t _sse2neon_get_fpcr()
^~~~~~~~~~~~~~~~~~
../lib/core/arm/sse2neon.h: In function '_sse2neon_get_fpcr':
../lib/core/arm/sse2neon.h:1761:23: error: old-style function definition [-Werror=old-style-definition]
../lib/core/arm/sse2neon.h: At top level:
../lib/core/arm/sse2neon.h:1785:27: error: function declaration isn't a prototype [-Werror=strict-prototypes]
FORCE_INLINE unsigned int _sse2neon_mm_get_flush_zero_mode()
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../lib/core/arm/sse2neon.h: In function '_sse2neon_mm_get_flush_zero_mode':
../lib/core/arm/sse2neon.h:1785:27: error: old-style function definition [-Werror=old-style-definition]
../lib/core/arm/sse2neon.h: At top level:
../lib/core/arm/sse2neon.h:1809:27: error: function declaration isn't a prototype [-Werror=strict-prototypes]
FORCE_INLINE unsigned int _MM_GET_ROUNDING_MODE()
^~~~~~~~~~~~~~~~~~~~~
../lib/core/arm/sse2neon.h: In function '_MM_GET_ROUNDING_MODE':
../lib/core/arm/sse2neon.h:1809:27: error: old-style function definition [-Werror=old-style-definition]
../lib/core/arm/sse2neon.h: At top level:
../lib/core/arm/sse2neon.h:2484:27: error: function declaration isn't a prototype [-Werror=strict-prototypes]
FORCE_INLINE unsigned int _mm_getcsr()
^~~~~~~~~~
../lib/core/arm/sse2neon.h: In function '_mm_getcsr':
../lib/core/arm/sse2neon.h:2484:27: error: old-style function definition [-Werror=old-style-definition]
../lib/core/arm/sse2neon.h: At top level:
../lib/core/arm/sse2neon.h:4803:19: error: function declaration isn't a prototype [-Werror=strict-prototypes]
FORCE_INLINE void _mm_pause()
^~~~~~~~~
../lib/core/arm/sse2neon.h: In function '_mm_pause':
../lib/core/arm/sse2neon.h:4803:19: error: old-style function definition [-Werror=old-style-definition]
../lib/core/arm/sse2neon.h: At top level:
../lib/core/arm/sse2neon.h:7639:1: error: 'static' is not at beginning of declaration [-Werror=old-style-declaration]
const static uint16_t ALIGN_STRUCT(16) _sse2neon_cmpestr_mask16b[8] = {
^~~~~
../lib/core/arm/sse2neon.h:7642:1: error: 'static' is not at beginning of declaration [-Werror=old-style-declaration]
const static uint8_t ALIGN_STRUCT(16) _sse2neon_cmpestr_mask8b[16] = {
^~~~~
../lib/core/arm/sse2neon.h: In function '_sse2neon_clz':
../lib/core/arm/sse2neon.h:8107:5: error: "_MSC_VER" is not defined, evaluates to 0 [-Werror=undef]
#if _MSC_VER
^~~~~~~~
../lib/core/arm/sse2neon.h: In function '_sse2neon_ctz':
../lib/core/arm/sse2neon.h:8119:5: error: "_MSC_VER" is not defined, evaluates to 0 [-Werror=undef]
#if _MSC_VER
^~~~~~~~
../lib/core/arm/sse2neon.h: In function '_sse2neon_ctzll':
../lib/core/arm/sse2neon.h:8131:5: error: "_MSC_VER" is not defined, evaluates to 0 [-Werror=undef]
#if _MSC_VER
^~~~~~~~
../lib/core/arm/sse2neon.h: At top level:
../lib/core/arm/sse2neon.h:9067:27: error: function declaration isn't a prototype [-Werror=strict-prototypes]
FORCE_INLINE unsigned int _sse2neon_mm_get_denormals_zero_mode()
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../lib/core/arm/sse2neon.h: In function '_sse2neon_mm_get_denormals_zero_mode':
../lib/core/arm/sse2neon.h:9067:27: error: old-style function definition [-Werror=old-style-definition]
The patch is to fix these build errors.
Acked-by: Andrija Kranjec [email protected]
Signed-off-by: Manoj Dahal [email protected]