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

Fix: gcc-14 point type checking error #208

Merged
merged 1 commit into from
Nov 4, 2024

Conversation

CesarRoaldes
Copy link

Upgrade to GCC 14 convert type-checking warnings to errors ref.

Compilation error message with GCC 14:

cc -fPIC -O3 -DDISABLE_SHADOWSOCKS -D_BSD_SOURCE -D_DEFAULT_SOURCE -Wall -std=c99 -D_XOPEN_SOURCE=600 -DENABLE_HTTPS_PROXY -DUSE_CRYPTO_OPENSSL   -c -o utils.o utils.c
utils.c: In function ‘red_connect_relay_ssl’:
utils.c:269:31: error: passing argument 2 of ‘connect’ from incompatible pointer type [-Wincompatible-pointer-types]
  269 |     error = connect(relay_fd, addr, addr_size(addr));
      |                               ^~~~
      |                               |
      |                               struct sockaddr_storage *
In file included from utils.c:22:
/usr/include/sys/socket.h:126:52: note: expected ‘const struct sockaddr *’ but argument is of type ‘struct sockaddr_storage *’
  126 | extern int connect (int __fd, __CONST_SOCKADDR_ARG __addr, socklen_t __len);
      |                                                    ^
make: *** [<builtin>: utils.o] Error 1

@semigodking semigodking merged commit 84c95fd into semigodking:master Nov 4, 2024
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.

2 participants