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

handlers: Fix -Werror=unused-parameter build error for spin #1363

Merged
merged 1 commit into from
Dec 1, 2023
Merged

handlers: Fix -Werror=unused-parameter build error for spin #1363

merged 1 commit into from
Dec 1, 2023

Conversation

haiyuewa
Copy link
Contributor

@haiyuewa haiyuewa commented Dec 1, 2023

Fix the build with "./configure CFLAGS='-Wall -Wextra -Werror' --with-spin=yes"

src/libcrun/handlers/spin.c: In function 'spin_load':
src/libcrun/handlers/spin.c:55:19: error: unused parameter 'cookie' [-Werror=unused-parameter]
   55 | spin_load (void **cookie, libcrun_error_t *err)
      |            ~~~~~~~^~~~~~
src/libcrun/handlers/spin.c: In function 'spin_unload':
src/libcrun/handlers/spin.c:93:20: error: unused parameter 'cookie' [-Werror=unused-parameter]
   93 | spin_unload (void *cookie, libcrun_error_t *err)
      |              ~~~~~~^~~~~~
src/libcrun/handlers/spin.c:93:45: error: unused parameter 'err' [-Werror=unused-parameter]
   93 | spin_unload (void *cookie, libcrun_error_t *err)
      |                            ~~~~~~~~~~~~~~~~~^~~
cc1: all warnings being treated as errors

Fix the build with "./configure CFLAGS='-Wall -Wextra -Werror' --with-spin=yes"

	src/libcrun/handlers/spin.c: In function 'spin_load':
	src/libcrun/handlers/spin.c:55:19: error: unused parameter 'cookie' [-Werror=unused-parameter]
	   55 | spin_load (void **cookie, libcrun_error_t *err)
	      |            ~~~~~~~^~~~~~
	src/libcrun/handlers/spin.c: In function 'spin_unload':
	src/libcrun/handlers/spin.c:93:20: error: unused parameter 'cookie' [-Werror=unused-parameter]
	   93 | spin_unload (void *cookie, libcrun_error_t *err)
	      |              ~~~~~~^~~~~~
	src/libcrun/handlers/spin.c:93:45: error: unused parameter 'err' [-Werror=unused-parameter]
	   93 | spin_unload (void *cookie, libcrun_error_t *err)
	      |                            ~~~~~~~~~~~~~~~~~^~~
	cc1: all warnings being treated as errors

Signed-off-by: Haiyue Wang <[email protected]>
Copy link
Member

@giuseppe giuseppe left a comment

Choose a reason for hiding this comment

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

LGTM

@giuseppe giuseppe merged commit ab6fd3f into containers:main Dec 1, 2023
38 checks passed
@haiyuewa haiyuewa deleted the fix-spin-handler-build-unused-error branch December 1, 2023 17:54
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.

2 participants