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

Unused variable error when compiling with extra errors #1655

Open
ozhang05 opened this issue Dec 10, 2024 · 1 comment
Open

Unused variable error when compiling with extra errors #1655

ozhang05 opened this issue Dec 10, 2024 · 1 comment

Comments

@ozhang05
Copy link

include/sol/stack_check_unqualified.hpp:585:75: Warning Unused Variable 'indextype'

Very minor error, but when compiling with extra error flags (-Wall -Wextra -Werror) reveals an unused variable error at line 585. Seemed to fix it for me by deleting the variable (unsure if this breaks other things), or just adding a (void) indextype.

@ysmolski
Copy link

ysmolski commented Jan 9, 2025

It is safe to change signature of the function to this:

		static bool check_two(types<K, V>, lua_State* arg_L, int relindex, type, Handler&& handler, record& tracking) {

indextype is not used in the function check_two as in the check_one. I am too lazy to make a PR, feel free to make this simple PR.

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

No branches or pull requests

2 participants