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

mempool.c: fix type signature of emalloc() #31

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

orlitzky
Copy link
Contributor

@orlitzky orlitzky commented Oct 4, 2024

This file declares emalloc() as,

void *emalloc(unsigned size);

whereas the actual implementation of emalloc in rbldnsd_util.c is,

char *emalloc(size_t size);

The mismatch can cause problems for link-time optimization; in particular it causes a warning to be raised -Wlto-type-mismatch. On Gentoo, for example, we encourage users of LTO to build with that warning enabled and promoted to an error.

This file declares emalloc() as,

  void *emalloc(unsigned size);

whereas the actual implementation of emalloc in rbldnsd_util.c is,

  char *emalloc(size_t size);

The mismatch can cause problems for link-time optimization; in
particular it causes a warning to be raised -Wlto-type-mismatch.
On Gentoo, for example, we encourage users of LTO to build with
that warning enabled and promoted to an error.
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