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 build warnings #21497

Merged
merged 2 commits into from
Jan 8, 2025
Merged

Conversation

martinpitt
Copy link
Member

Just saw this on my machine, and it breaks tools/make-sysext:

src/ws/cockpithandlers.c: In function ‘build_environment’:
src/ws/cockpithandlers.c:351:8: error: unused variable ‘i’ [-Werror=unused-variable]
  351 |   gint i;
      |        ^
src/ws/cockpithandlers.c:350:15: error: unused variable ‘osr’ [-Werror=unused-variable]
  350 |   JsonObject *osr;
      |               ^~~
src/ws/cockpithandlers.c:348:16: error: unused variable ‘value’ [-Werror=unused-variable]
  348 |   const gchar *value;
      |                ^~~~~
cc1: all warnings being treated as errors
  CC       src/common/libcockpit_common_a-cockpittemplate.o
make[1]: *** [Makefile:3353: src/ws/libcockpit_ws_a-cockpithandlers.o] Error 1

Configure with `--enable-strict`, which will fail the build on warnings.
Commit 5a0a6ab accidentally introduced some, and we don't want more
warnings to creep into the code.
Commit 5a0a6ab removed their usage, but didn't remove their
declarations.
@martinpitt martinpitt added no-test For doc/workflow changes, or experiments which don't need a full CI run, .github-changes Set by a reviewer just before landing to acknowledge that a PR changes github workflows labels Jan 8, 2025
Copy link
Member

@allisonkarlitskaya allisonkarlitskaya left a comment

Choose a reason for hiding this comment

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

thanks!

@allisonkarlitskaya allisonkarlitskaya merged commit ee0e723 into cockpit-project:main Jan 8, 2025
32 of 34 checks passed
@martinpitt martinpitt deleted the warnings branch January 8, 2025 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
.github-changes Set by a reviewer just before landing to acknowledge that a PR changes github workflows no-test For doc/workflow changes, or experiments which don't need a full CI run,
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants