Skip to content

Conversation

@kevinscollins
Copy link

Modern C compilers (particularly gcc with -std=c23 or Alpine's musl gcc) are stricter about function pointer type compatibility. This fixes a compilation error where loop_func parameter type didn't match the struct member declaration.

Error was:

ndloop.c:359:19: error: assignment to 'void (*)(void)' from incompatible pointer type

The struct member at line 59 uses 'struct NA_MD_LOOP *' (forward declaration within the typedef), while the function parameter at line 334 used 'na_md_loop_t *'. Although these are the same type after typedef expansion, strict compilers require exact signature matching for function pointer assignments.

Changed line 334 to use 'struct NA_MD_LOOP *' to match the struct member declaration, resolving the type incompatibility.

Modern C compilers (particularly gcc with -std=c23 or Alpine's musl gcc)
are stricter about function pointer type compatibility. This fixes a
compilation error where loop_func parameter type didn't match the
struct member declaration.

Error was:
  ndloop.c:359:19: error: assignment to 'void (*)(void)' from
  incompatible pointer type

The struct member at line 59 uses 'struct NA_MD_LOOP *' (forward
declaration within the typedef), while the function parameter at
line 334 used 'na_md_loop_t *'. Although these are the same type
after typedef expansion, strict compilers require exact signature
matching for function pointer assignments.

Changed line 334 to use 'struct NA_MD_LOOP *' to match the struct
member declaration, resolving the type incompatibility.
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