mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-22 00:43:24 +00:00
Resolve compiler warnings for regression tests
This commit is contained in:
committed by
Tate, Hongliang Tian
parent
42881bcdaa
commit
dede22843a
@ -13,7 +13,7 @@
|
||||
|
||||
int main()
|
||||
{
|
||||
int server_fd, accepted_fd, len;
|
||||
int server_fd, accepted_fd;
|
||||
struct sockaddr_un server_addr, client_addr;
|
||||
char buf[BUFFER_SIZE];
|
||||
|
||||
@ -45,14 +45,14 @@ int main()
|
||||
printf("Server is listening...\n");
|
||||
|
||||
// Accept the incoming connection
|
||||
len = sizeof(client_addr);
|
||||
socklen_t len = sizeof(client_addr);
|
||||
accepted_fd = accept(server_fd, (struct sockaddr *)&client_addr, &len);
|
||||
if (accepted_fd == -1) {
|
||||
perror("accept");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
int addrlen = sizeof(client_addr);
|
||||
socklen_t addrlen = sizeof(client_addr);
|
||||
int rc = getpeername(accepted_fd, (struct sockaddr *)&client_addr,
|
||||
&addrlen);
|
||||
if (rc == -1) {
|
||||
|
Reference in New Issue
Block a user