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

Eliminate the redundant ev_uint64_t for eventfd #1652

Merged
merged 1 commit into from
May 18, 2024

Conversation

panjf2000
Copy link
Contributor

Signed-off-by: Andy Pan i@andypan.me

---------

Signed-off-by: Andy Pan <i@andypan.me>
@panjf2000
Copy link
Contributor Author

Ping @azat

@azat azat merged commit a41453a into libevent:master May 18, 2024
56 of 70 checks passed
@panjf2000 panjf2000 deleted the eventfd-opt branch May 18, 2024 14:02
@azat
Copy link
Member

azat commented May 18, 2024

Interesting, why CI failed for mingw? - https://github.com/libevent/libevent/actions/runs/9056080592/job/24878118656?pr=1652

../evutil.c: In function 'evutil_set_tcp_keepalive':
../evutil.c:3147:54: error: passing argument 4 of 'setsockopt' from incompatible pointer type [-Wincompatible-pointer-types]
 3147 |         if (setsockopt(fd, SOL_SOCKET, SO_KEEPALIVE, &on, sizeof(on)))
      |                                                      ^~~
      |                                                      |
      |                                                      int *
In file included from ../evutil.c:39:
D:/a/_temp/msys64/mingw64/include/winsock2.h:1035:88: note: expected 'const char *' but argument is of type 'int *'
 1035 |   WINSOCK_API_LINKAGE int WSAAPI setsockopt(SOCKET s,int level,int optname,const char *optval,int optlen);
      |                                                                            ~~~~~~~~~~~~^~~~~~
../evutil.c:3161:55: error: passing argument 4 of 'setsockopt' from incompatible pointer type [-Wincompatible-pointer-types]
 3161 |         if (setsockopt(fd, IPPROTO_TCP, TCP_KEEPIDLE, &idle, sizeof(idle)))
      |                                                       ^~~~~
      |                                                       |
      |                                                       int *
D:/a/_temp/msys64/mingw64/include/winsock2.h:1035:88: note: expected 'const char *' but argument is of type 'int *'
 1035 |   WINSOCK_API_LINKAGE int WSAAPI setsockopt(SOCKET s,int level,int optname,const char *optval,int optlen);
      |                                                                            ~~~~~~~~~~~~^~~~~~
../evutil.c:3164:56: error: passing argument 4 of 'setsockopt' from incompatible pointer type [-Wincompatible-pointer-types]
 3164 |         if (setsockopt(fd, IPPROTO_TCP, TCP_KEEPINTVL, &intvl, sizeof(intvl)))
      |                                                        ^~~~~~
      |                                                        |
      |                                                        int *
D:/a/_temp/msys64/mingw64/include/winsock2.h:1035:88: note: expected 'const char *' but argument is of type 'int *'
 1035 |   WINSOCK_API_LINKAGE int WSAAPI setsockopt(SOCKET s,int level,int optname,const char *optval,int optlen);
      |                                                                            ~~~~~~~~~~~~^~~~~~
../evutil.c:3168:54: error: passing argument 4 of 'setsockopt' from incompatible pointer type [-Wincompatible-pointer-types]
 3168 |         if (setsockopt(fd, IPPROTO_TCP, TCP_KEEPCNT, &cnt, sizeof(cnt)))
      |                                                      ^~~~
      |                                                      |
      |                                                      int *

@panjf2000
Copy link
Contributor Author

No idea, these seem like recent failure of compiler errors which used to be compiler warns.

@panjf2000
Copy link
Contributor Author

GCC version got changed on that runner?

@azat
Copy link
Member

azat commented May 18, 2024

I haven't checked yet, maybe you can take a look?

@panjf2000
Copy link
Contributor Author

panjf2000 commented May 18, 2024

I'll try to find out the root cause, and maybe open a PR explicitly casting the int pointer to the expected type to avoid this kind warnings/errors if I have to.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants