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

test/capi: fix compiler warning in profiler_cb #120

Merged
merged 1 commit into from
Feb 20, 2025

Conversation

ligurio
Copy link
Owner

@ligurio ligurio commented Feb 20, 2025

The patch fixes a compiler warning:

/home/sergeyb/sources/lua-c-api-tests/tests/capi/luaL_loadbuffer_proto/luaL_loadbuffer_proto_test.cc:371:32: warning: cast from 'void (*)(lua_State
 *, void *, size_t *)' (aka 'void (*)(lua_State *, void *, unsigned long *)') to 'luaJIT_profile_callback' (aka 'void (*)(void *, lua_State *, int,
 int)') converts to incompatible function type [-Wcast-function-type-mismatch]
  371 |         luaJIT_profile_start(L, mode, (luaJIT_profile_callback)profiler_cb, NULL);
      |                                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.

The patch fixes a compiler warning:

```
/home/sergeyb/sources/lua-c-api-tests/tests/capi/luaL_loadbuffer_proto/luaL_loadbuffer_proto_test.cc:371:32: warning: cast from 'void (*)(lua_State *, void *, size_t *)' (aka 'void (*)(lua_State *, void *, unsigned long *)') to 'luaJIT_profile_callback' (aka 'void (*)(void *, lua_State *, int, int)') converts to incompatible function type [-Wcast-function-type-mismatch]
  371 |         luaJIT_profile_start(L, mode, (luaJIT_profile_callback)profiler_cb, NULL);
      |                                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
```
@ligurio ligurio force-pushed the ligurio/gh-xxxx-fix-profiler_cb branch from 0f010f7 to c879575 Compare February 20, 2025 08:31
@ligurio ligurio merged commit 0b0ac38 into master Feb 20, 2025
12 checks passed
@ligurio ligurio deleted the ligurio/gh-xxxx-fix-profiler_cb branch February 20, 2025 11:29
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.

1 participant