summaryrefslogtreecommitdiffstats
path: root/testsuites/psxtests/psxhdrs/sys
diff options
context:
space:
mode:
Diffstat (limited to 'testsuites/psxtests/psxhdrs/sys')
-rw-r--r--testsuites/psxtests/psxhdrs/sys/select/pselect.c4
-rw-r--r--testsuites/psxtests/psxhdrs/sys/socket/bind.c2
-rw-r--r--testsuites/psxtests/psxhdrs/sys/socket/connect.c6
-rw-r--r--testsuites/psxtests/psxhdrs/sys/socket/getsockopt.c2
-rw-r--r--testsuites/psxtests/psxhdrs/sys/socket/send.c2
-rw-r--r--testsuites/psxtests/psxhdrs/sys/socket/sendmsg.c2
-rw-r--r--testsuites/psxtests/psxhdrs/sys/socket/sendto.c4
-rw-r--r--testsuites/psxtests/psxhdrs/sys/socket/setsockopt.c2
-rw-r--r--testsuites/psxtests/psxhdrs/sys/stat/futimens.c4
-rw-r--r--testsuites/psxtests/psxhdrs/sys/stat/utimensat.c4
-rw-r--r--testsuites/psxtests/psxhdrs/sys/time/utimes.c8
11 files changed, 20 insertions, 20 deletions
diff --git a/testsuites/psxtests/psxhdrs/sys/select/pselect.c b/testsuites/psxtests/psxhdrs/sys/select/pselect.c
index d35a0d0921..ad96dda686 100644
--- a/testsuites/psxtests/psxhdrs/sys/select/pselect.c
+++ b/testsuites/psxtests/psxhdrs/sys/select/pselect.c
@@ -45,8 +45,8 @@ int test( void )
fd_set readfds;
fd_set writefds;
fd_set errorfds;
- struct timespec timeout;
- sigset_t sigmask;
+ struct timespec timeout = { 0 };
+ sigset_t sigmask = { 0 };
return_value = pselect(nfds, &readfds, &writefds, &errorfds, &timeout, &sigmask);
return return_value;
diff --git a/testsuites/psxtests/psxhdrs/sys/socket/bind.c b/testsuites/psxtests/psxhdrs/sys/socket/bind.c
index 3da39b31ff..2fa19f2c26 100644
--- a/testsuites/psxtests/psxhdrs/sys/socket/bind.c
+++ b/testsuites/psxtests/psxhdrs/sys/socket/bind.c
@@ -44,7 +44,7 @@ int test(void);
int test(void)
{
int sockfd = 4;
- struct sockaddr addr;
+ struct sockaddr addr = { 0 };
socklen_t addrlen = sizeof(addr);
return bind(sockfd, &addr, addrlen);
diff --git a/testsuites/psxtests/psxhdrs/sys/socket/connect.c b/testsuites/psxtests/psxhdrs/sys/socket/connect.c
index 1b8f5b9001..afb560ff52 100644
--- a/testsuites/psxtests/psxhdrs/sys/socket/connect.c
+++ b/testsuites/psxtests/psxhdrs/sys/socket/connect.c
@@ -43,9 +43,9 @@ int test(void);
int test(void)
{
- int sockfd = 4;
- struct sockaddr addr;
- socklen_t addrlen = sizeof(addr);
+ int sockfd = 4;
+ struct sockaddr addr = { 0 };
+ socklen_t addrlen = sizeof(addr);
return connect(sockfd, &addr, addrlen);
}
diff --git a/testsuites/psxtests/psxhdrs/sys/socket/getsockopt.c b/testsuites/psxtests/psxhdrs/sys/socket/getsockopt.c
index 0ecf27dda5..e0cd442441 100644
--- a/testsuites/psxtests/psxhdrs/sys/socket/getsockopt.c
+++ b/testsuites/psxtests/psxhdrs/sys/socket/getsockopt.c
@@ -48,7 +48,7 @@ int test(void)
int optname = 67;
int value;
void *optval = &value;
- socklen_t optlen;
+ socklen_t optlen = { 0 };
return getsockopt(sockfd, level, optname, optval, &optlen);
}
diff --git a/testsuites/psxtests/psxhdrs/sys/socket/send.c b/testsuites/psxtests/psxhdrs/sys/socket/send.c
index b93a87f482..de2ad3ba5a 100644
--- a/testsuites/psxtests/psxhdrs/sys/socket/send.c
+++ b/testsuites/psxtests/psxhdrs/sys/socket/send.c
@@ -44,7 +44,7 @@ ssize_t test(void);
ssize_t test(void)
{
int sockfd = 4;
- int buffer;
+ int buffer = 0;
void *buf = &buffer;
size_t len = sizeof(buffer);
int flags = 7;
diff --git a/testsuites/psxtests/psxhdrs/sys/socket/sendmsg.c b/testsuites/psxtests/psxhdrs/sys/socket/sendmsg.c
index 3205271572..a14b8ff8d4 100644
--- a/testsuites/psxtests/psxhdrs/sys/socket/sendmsg.c
+++ b/testsuites/psxtests/psxhdrs/sys/socket/sendmsg.c
@@ -44,7 +44,7 @@ ssize_t test(void);
ssize_t test(void)
{
int sockfd = 4;
- struct msghdr msg;
+ struct msghdr msg = { 0 };
int flags = 7;
diff --git a/testsuites/psxtests/psxhdrs/sys/socket/sendto.c b/testsuites/psxtests/psxhdrs/sys/socket/sendto.c
index 298d17f4ec..5050f1a0a5 100644
--- a/testsuites/psxtests/psxhdrs/sys/socket/sendto.c
+++ b/testsuites/psxtests/psxhdrs/sys/socket/sendto.c
@@ -44,11 +44,11 @@ ssize_t test(void);
ssize_t test(void)
{
int sockfd = 4;
- int buffer;
+ int buffer = 0;
const void *buf = &buffer;
size_t len = sizeof(buffer);
int flags = 7;
- struct sockaddr dest_addr;
+ struct sockaddr dest_addr = { 0 };
socklen_t addrlen = sizeof(dest_addr);
return sendto(sockfd, buf, len, flags, &dest_addr, addrlen);
diff --git a/testsuites/psxtests/psxhdrs/sys/socket/setsockopt.c b/testsuites/psxtests/psxhdrs/sys/socket/setsockopt.c
index d373add6de..e4d21d3837 100644
--- a/testsuites/psxtests/psxhdrs/sys/socket/setsockopt.c
+++ b/testsuites/psxtests/psxhdrs/sys/socket/setsockopt.c
@@ -46,7 +46,7 @@ int test(void)
int sockfd = 4;
int level = SOL_SOCKET;
int optname = 67;
- int value;
+ int value = 0;
void *optval = &value;
socklen_t optlen = sizeof(value);
diff --git a/testsuites/psxtests/psxhdrs/sys/stat/futimens.c b/testsuites/psxtests/psxhdrs/sys/stat/futimens.c
index 75fa0ce0e6..9892352b71 100644
--- a/testsuites/psxtests/psxhdrs/sys/stat/futimens.c
+++ b/testsuites/psxtests/psxhdrs/sys/stat/futimens.c
@@ -42,9 +42,9 @@ int test( void )
{
int return_value;
int fd = 1;
- struct timespec times[2];
+ struct timespec times[2] = { 0 };
return_value = futimens(fd, times);
return (return_value != -1);
-} \ No newline at end of file
+}
diff --git a/testsuites/psxtests/psxhdrs/sys/stat/utimensat.c b/testsuites/psxtests/psxhdrs/sys/stat/utimensat.c
index c8c0767ce3..b74cc1a44b 100644
--- a/testsuites/psxtests/psxhdrs/sys/stat/utimensat.c
+++ b/testsuites/psxtests/psxhdrs/sys/stat/utimensat.c
@@ -44,9 +44,9 @@ int test( void )
int return_value;
int fd = 1;
char *path = "/";
- struct timespec times[2];
+ struct timespec times[2] = { 0 };
int flag = AT_SYMLINK_NOFOLLOW;
return_value = utimensat(fd, path, times, flag);
return (return_value != -1);
-} \ No newline at end of file
+}
diff --git a/testsuites/psxtests/psxhdrs/sys/time/utimes.c b/testsuites/psxtests/psxhdrs/sys/time/utimes.c
index ae69eb5ded..bebc7a77b4 100644
--- a/testsuites/psxtests/psxhdrs/sys/time/utimes.c
+++ b/testsuites/psxtests/psxhdrs/sys/time/utimes.c
@@ -5,7 +5,7 @@
/*
* SPDX-License-Identifier: BSD-2-Clause
- *
+ *
* Copyright (C) 2018, Zenon
*
* Redistribution and use in source and binary forms, with or without
@@ -41,8 +41,8 @@ int test(void);
int test(void)
{
int callback;
- struct timeval tv;
-
- callback = utimes(NULL, &tv);
+ struct timeval tv[2] = { 0 };
+
+ callback = utimes(NULL, &tv[0]);
return (callback == -1);
}