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

Fix compiler warnings #155

Merged
merged 2 commits into from
Apr 8, 2024
Merged

Fix compiler warnings #155

merged 2 commits into from
Apr 8, 2024

Conversation

bjosv
Copy link
Collaborator

@bjosv bjosv commented Sep 22, 2023

Clang warnings:
When building using a newer Clang with additional diagnostics the following warnings are indicated:

  • unused-but-set-variable
  • strict-prototypes

This is corrected by removing the unused variable and adding void to function definitions/declarations.
Reproducible using CC="clang-13" CFLAGS="-Wall -pedantic" cmake ..

GCC warnings:
When building with gcc >= 11 the following warning is indicated:

  • format-extra-args

This is corrected by replacing the use of the deprecated libcheck API fail_if() with ck_assert_msg according to recommendation.

This warning can be seen in a CI run.

When building using a newer Clang with additional diagnostics
the following warnings are given:
 -Wunused-but-set-variable
 -Wstrict-prototypes
These issues are corrected in this commit.

Reproducable using:
CC="clang-13" CFLAGS="-Wall -pedantic" cmake ..
Fixes [-Wformat-extra-args] warnings when built using GCC,
See details in:
libcheck/check#298
@coveralls
Copy link

Coverage Status

coverage: 91.281% (-0.02%) from 91.304% when pulling 7c625f8 on Nordix:fix-warnings into c105117 on c9s:2.0.

@c9s c9s merged commit ee508f0 into c9s:2.0 Apr 8, 2024
10 checks passed
@bjosv bjosv deleted the fix-warnings branch April 8, 2024 13:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants