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

-Wincompatible-pointer-types error in init.c, if gcc version >= 14 #59

Open
akira-kurogane opened this issue Aug 7, 2024 · 0 comments

Comments

@akira-kurogane
Copy link

When remaking my lwip-using unikernel on a new computer the build terminated on this error:

/home/akira/avar_src/app-mongod403/w/libs/lwip/init.c: In function ‘liblwip_init’:
/home/akira/avar_src/app-mongod403/w/libs/lwip/init.c:402:58: error: passing argument 2 of ‘dns_setserver’ from incompatible pointer type [-Wincompatible-pointer-types]
  402 |                                 dns_setserver(nb_dns4++, &dns4);
      |                                                          ^~~~~
      |                                                          |
      |                                                          ip4_addr_t * {aka struct ip4_addr *}

It appears that gcc version >= 14 will make -Wincompatible-pointer-types an error instead of warning by default: https://gcc.gnu.org/gcc-14/porting_to.html

My workaround for now is simply to add -Wno-incompatible-pointer-types (or -Wno-error=incompatible-pointer-types?) to the LIBLWIP_CFLAGS line in lwip's Makefile.uk.

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

1 participant