Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed warning about strict prototypes for cpu_check_features. #1265

Merged
merged 1 commit into from
May 5, 2022

Conversation

nmoinvaz
Copy link
Member

@nmoinvaz nmoinvaz commented May 3, 2022

This warning happens for every time cpu_features.h is included:

cpu_features.h:22:31: warning: this function declaration is not a prototype [-Wstrict-prototypes]
extern void cpu_check_features();
                              ^
                               void

In cpu_features.c it is defined as:

Z_INTERNAL void cpu_check_features(void)

@codecov
Copy link

codecov bot commented May 3, 2022

Codecov Report

Merging #1265 (b4aa437) into develop (4422a6b) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff            @@
##           develop    #1265   +/-   ##
========================================
  Coverage    87.34%   87.34%           
========================================
  Files          115      115           
  Lines        10202    10202           
  Branches      2574     2574           
========================================
  Hits          8911     8911           
- Misses         962      963    +1     
+ Partials       329      328    -1     
Flag Coverage Δ
macos_clang 33.33% <ø> (ø)
macos_gcc 74.95% <ø> (ø)
ubuntu_clang 87.42% <ø> (ø)
ubuntu_clang_debug 86.15% <ø> (-0.82%) ⬇️
ubuntu_clang_inflate_allow_invalid_dist 87.12% <ø> (ø)
ubuntu_clang_inflate_strict 87.37% <ø> (ø)
ubuntu_clang_mmap 87.56% <ø> (ø)
ubuntu_clang_pigz 40.95% <ø> (ø)
ubuntu_clang_pigz_no_optim 41.14% <ø> (ø)
ubuntu_clang_pigz_no_threads 40.53% <ø> (ø)
ubuntu_clang_reduced_mem 86.97% <ø> (-0.86%) ⬇️
ubuntu_gcc 77.01% <ø> (ø)
ubuntu_gcc_aarch64 77.31% <ø> (ø)
ubuntu_gcc_aarch64_compat_no_opt 75.36% <ø> (ø)
ubuntu_gcc_aarch64_no_acle 76.20% <ø> (ø)
ubuntu_gcc_aarch64_no_neon 76.09% <ø> (ø)
ubuntu_gcc_armhf 77.32% <ø> (ø)
ubuntu_gcc_armhf_compat_no_opt 75.28% <ø> (ø)
ubuntu_gcc_armhf_no_acle 77.34% <ø> (ø)
ubuntu_gcc_armhf_no_neon 77.10% <ø> (ø)
ubuntu_gcc_armsf 77.19% <ø> (ø)
ubuntu_gcc_armsf_compat_no_opt 74.95% <ø> (ø)
ubuntu_gcc_benchmark 75.00% <ø> (+0.37%) ⬆️
ubuntu_gcc_compat_no_opt 76.50% <ø> (ø)
ubuntu_gcc_compat_sprefix 75.10% <ø> (ø)
ubuntu_gcc_m32 74.84% <ø> (ø)
ubuntu_gcc_mingw_i686 0.00% <ø> (ø)
ubuntu_gcc_mingw_x86_64 0.00% <ø> (ø)
ubuntu_gcc_no_avx2 76.66% <ø> (ø)
ubuntu_gcc_no_ctz 74.77% <ø> (ø)
ubuntu_gcc_no_ctzll 74.80% <ø> (ø)
ubuntu_gcc_no_pclmulqdq 75.44% <ø> (ø)
ubuntu_gcc_no_sse2 76.72% <ø> (ø)
ubuntu_gcc_no_sse4 76.26% <ø> (ø)
ubuntu_gcc_o1 75.97% <ø> (ø)
ubuntu_gcc_osb ∅ <ø> (∅)
ubuntu_gcc_pigz 38.90% <ø> (ø)
ubuntu_gcc_pigz_aarch64 39.35% <ø> (ø)
ubuntu_gcc_ppc 73.82% <ø> (ø)
ubuntu_gcc_ppc64 74.56% <ø> (ø)
ubuntu_gcc_ppc64le 74.54% <ø> (ø)
ubuntu_gcc_ppc_no_power8 74.74% <ø> (ø)
ubuntu_gcc_s390x 74.73% <ø> (ø)
ubuntu_gcc_s390x_dfltcc 72.09% <ø> (ø)
ubuntu_gcc_s390x_dfltcc_compat 73.63% <ø> (ø)
ubuntu_gcc_s390x_no_crc32 74.51% <ø> (ø)
ubuntu_gcc_sparc64 74.62% <ø> (ø)
ubuntu_gcc_sprefix 74.89% <ø> (ø)
win64_gcc 73.96% <ø> (ø)
win64_gcc_compat_no_opt 73.98% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
uncompr.c 91.30% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4422a6b...b4aa437. Read the comment docs.

Copy link
Collaborator

@mtl1979 mtl1979 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't like "void" as sole parameter for function, but this is about strict compliance and C is a lot stricter than C++ when it comes to prototypes of functions.

@Dead2 Dead2 merged commit f8a7f26 into zlib-ng:develop May 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants