* [LTP] [PATCH 0/3][RFC] Android fixes and -Werror-implicit-function-declaration as default
@ 2019-04-11 23:31 Petr Vorel
2019-04-11 23:31 ` [LTP] [RFC PATCH 1/3] cve/cve-2014-0196: Don't use libutil for Android Petr Vorel
` (2 more replies)
0 siblings, 3 replies; 16+ messages in thread
From: Petr Vorel @ 2019-04-11 23:31 UTC (permalink / raw)
To: ltp
Hi,
patchset [1] from Zhengwang Ruan reminded me my old patchset, which I
haven't sent. Still not sure if all this hunting for 'implicitly
declaring library function' make sense. Maybe it'd be better just remove
-Werror-implicit-function-declaration for Android. Nevertheless this
patchset fixes most (or even all) of them enable
-Werror-implicit-function-declaration for all targets/platforms.
NOTE: this still don't fix Android build (with NDK compiler, outside AOSP
tree), but makes it closer (now it builds at least lib/ folder).
Kind regards,
Petr
[1] http://lists.linux.it/pipermail/ltp/2019-April/011643.html
Petr Vorel (3):
cve/cve-2014-0196: Don't use libutil for Android
Add more missing <string.h> and <strings.h> includes
make: Add -Werror-implicit-function-declaration for all targets
include/mk/env_post.mk | 4 +---
include/tst_net.h | 1 +
include/tst_numa.h | 2 ++
lib/tst_af_alg.c | 1 +
testcases/cve/Makefile | 6 +++++-
testcases/kernel/syscalls/acct/acct01.c | 1 +
testcases/kernel/syscalls/add_key/add_key02.c | 1 +
testcases/kernel/syscalls/chmod/chmod06.c | 1 +
testcases/kernel/syscalls/clock_adjtime/clock_adjtime01.c | 1 +
testcases/kernel/syscalls/clock_adjtime/clock_adjtime02.c | 1 +
.../kernel/syscalls/copy_file_range/copy_file_range01.c | 1 +
testcases/kernel/syscalls/epoll_ctl/epoll_ctl01.c | 1 +
testcases/kernel/syscalls/epoll_wait/epoll_wait01.c | 1 +
testcases/kernel/syscalls/execl/execl01_child.c | 2 ++
testcases/kernel/syscalls/execle/execle01_child.c | 4 +++-
testcases/kernel/syscalls/execlp/execlp01_child.c | 2 ++
testcases/kernel/syscalls/execv/execv01_child.c | 2 ++
testcases/kernel/syscalls/execve/execve01_child.c | 4 +++-
testcases/kernel/syscalls/execve/execve_child.c | 4 +++-
testcases/kernel/syscalls/execvp/execvp01_child.c | 2 ++
testcases/kernel/syscalls/exit/exit02.c | 1 +
testcases/kernel/syscalls/getcwd/getcwd04.c | 1 +
testcases/kernel/syscalls/getrandom/getrandom02.c | 2 ++
testcases/kernel/syscalls/ioctl/ioctl08.c | 1 +
testcases/kernel/syscalls/keyctl/keyctl05.c | 1 +
testcases/kernel/syscalls/keyctl/keyctl06.c | 1 +
testcases/kernel/syscalls/link/link08.c | 1 +
testcases/kernel/syscalls/listxattr/listxattr02.c | 1 +
testcases/kernel/syscalls/llistxattr/llistxattr02.c | 1 +
testcases/kernel/syscalls/lremovexattr/lremovexattr01.c | 1 +
testcases/kernel/syscalls/madvise/madvise10.c | 1 +
testcases/kernel/syscalls/mkdir/mkdir03.c | 1 +
testcases/kernel/syscalls/read/read01.c | 1 +
testcases/kernel/syscalls/request_key/request_key03.c | 1 +
testcases/kernel/syscalls/rmdir/rmdir02.c | 1 +
testcases/kernel/syscalls/setsockopt/setsockopt03.c | 1 +
testcases/kernel/syscalls/write/write03.c | 1 +
testcases/kernel/syscalls/writev/writev07.c | 1 +
testcases/lib/tst_checkpoint.c | 1 +
testcases/lib/tst_device.c | 1 +
testcases/lib/tst_kvcmp.c | 1 +
testcases/network/sctp/sctp_big_chunk.c | 1 +
42 files changed, 58 insertions(+), 7 deletions(-)
--
2.20.1
^ permalink raw reply [flat|nested] 16+ messages in thread
* [LTP] [RFC PATCH 1/3] cve/cve-2014-0196: Don't use libutil for Android
2019-04-11 23:31 [LTP] [PATCH 0/3][RFC] Android fixes and -Werror-implicit-function-declaration as default Petr Vorel
@ 2019-04-11 23:31 ` Petr Vorel
2019-04-12 19:39 ` Sandeep Patil
2019-04-11 23:31 ` [LTP] [RFC PATCH 2/3] Add more missing <string.h> and <strings.h> includes Petr Vorel
2019-04-11 23:31 ` [LTP] [RFC PATCH 3/3] make: Add -Werror-implicit-function-declaration for all targets Petr Vorel
2 siblings, 1 reply; 16+ messages in thread
From: Petr Vorel @ 2019-04-11 23:31 UTC (permalink / raw)
To: ltp
From: Petr Vorel <petr.vorel@gmail.com>
as it's not available for it.
Signed-off-by: Petr Vorel <petr.vorel@gmail.com>
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
testcases/cve/Makefile | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/testcases/cve/Makefile b/testcases/cve/Makefile
index 6dc401cff..da44fff60 100644
--- a/testcases/cve/Makefile
+++ b/testcases/cve/Makefile
@@ -27,7 +27,11 @@ cve-2016-7117: CFLAGS += -pthread
cve-2016-7117: LDLIBS += -lrt
cve-2014-0196: CFLAGS += -pthread
-cve-2014-0196: LDLIBS += -lrt -lutil
+cve-2014-0196: LDLIBS += -lrt
+
+ifneq ($(ANDROID),1)
+cve-2014-0196: LDLIBS += -lutil
+endif
cve-2017-2671: CFLAGS += -pthread
cve-2017-2671: LDLIBS += -lrt
--
2.20.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [LTP] [RFC PATCH 2/3] Add more missing <string.h> and <strings.h> includes
2019-04-11 23:31 [LTP] [PATCH 0/3][RFC] Android fixes and -Werror-implicit-function-declaration as default Petr Vorel
2019-04-11 23:31 ` [LTP] [RFC PATCH 1/3] cve/cve-2014-0196: Don't use libutil for Android Petr Vorel
@ 2019-04-11 23:31 ` Petr Vorel
2019-04-12 2:12 ` =?unknown-8bit?b?6Ziu5q2j5pe6?=
2019-04-11 23:31 ` [LTP] [RFC PATCH 3/3] make: Add -Werror-implicit-function-declaration for all targets Petr Vorel
2 siblings, 1 reply; 16+ messages in thread
From: Petr Vorel @ 2019-04-11 23:31 UTC (permalink / raw)
To: ltp
From: Petr Vorel <petr.vorel@gmail.com>
Signed-off-by: Petr Vorel <petr.vorel@gmail.com>
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
Instead of this one [1] can be chosen or this can be rebased on [1]
(commit after [1]). I created it few weeks ago, but didn't consider it
reasonable to be added. But with next commit, which adds
-Werror-implicit-function-declaration for all IMHO it makes sense.
Other users of strcmp() and friends aren't causing a failure, probably
due other header including <string.h>.
Kind regards,
Petr
[1] http://lists.linux.it/pipermail/ltp/2019-April/011643.html
---
include/tst_net.h | 1 +
include/tst_numa.h | 2 ++
lib/tst_af_alg.c | 1 +
testcases/kernel/syscalls/acct/acct01.c | 1 +
testcases/kernel/syscalls/add_key/add_key02.c | 1 +
testcases/kernel/syscalls/chmod/chmod06.c | 1 +
testcases/kernel/syscalls/clock_adjtime/clock_adjtime01.c | 1 +
testcases/kernel/syscalls/clock_adjtime/clock_adjtime02.c | 1 +
testcases/kernel/syscalls/copy_file_range/copy_file_range01.c | 1 +
testcases/kernel/syscalls/epoll_ctl/epoll_ctl01.c | 1 +
testcases/kernel/syscalls/epoll_wait/epoll_wait01.c | 1 +
testcases/kernel/syscalls/execl/execl01_child.c | 2 ++
testcases/kernel/syscalls/execle/execle01_child.c | 4 +++-
testcases/kernel/syscalls/execlp/execlp01_child.c | 2 ++
testcases/kernel/syscalls/execv/execv01_child.c | 2 ++
testcases/kernel/syscalls/execve/execve01_child.c | 4 +++-
testcases/kernel/syscalls/execve/execve_child.c | 4 +++-
testcases/kernel/syscalls/execvp/execvp01_child.c | 2 ++
testcases/kernel/syscalls/exit/exit02.c | 1 +
testcases/kernel/syscalls/getcwd/getcwd04.c | 1 +
testcases/kernel/syscalls/getrandom/getrandom02.c | 2 ++
testcases/kernel/syscalls/ioctl/ioctl08.c | 1 +
testcases/kernel/syscalls/keyctl/keyctl05.c | 1 +
testcases/kernel/syscalls/keyctl/keyctl06.c | 1 +
testcases/kernel/syscalls/link/link08.c | 1 +
testcases/kernel/syscalls/listxattr/listxattr02.c | 1 +
testcases/kernel/syscalls/llistxattr/llistxattr02.c | 1 +
testcases/kernel/syscalls/lremovexattr/lremovexattr01.c | 1 +
testcases/kernel/syscalls/madvise/madvise10.c | 1 +
testcases/kernel/syscalls/mkdir/mkdir03.c | 1 +
testcases/kernel/syscalls/read/read01.c | 1 +
testcases/kernel/syscalls/request_key/request_key03.c | 1 +
testcases/kernel/syscalls/rmdir/rmdir02.c | 1 +
testcases/kernel/syscalls/setsockopt/setsockopt03.c | 1 +
testcases/kernel/syscalls/write/write03.c | 1 +
testcases/kernel/syscalls/writev/writev07.c | 1 +
testcases/lib/tst_checkpoint.c | 1 +
testcases/lib/tst_device.c | 1 +
testcases/lib/tst_kvcmp.c | 1 +
testcases/network/sctp/sctp_big_chunk.c | 1 +
40 files changed, 52 insertions(+), 3 deletions(-)
diff --git a/include/tst_net.h b/include/tst_net.h
index cb97b7b61..971d5ec2c 100644
--- a/include/tst_net.h
+++ b/include/tst_net.h
@@ -17,6 +17,7 @@
#include <arpa/inet.h>
#include <errno.h>
+#include <string.h>
#define MAX_IPV4_PREFIX 32
#define MAX_IPV6_PREFIX 128
diff --git a/include/tst_numa.h b/include/tst_numa.h
index a4cd1be37..4f9806602 100644
--- a/include/tst_numa.h
+++ b/include/tst_numa.h
@@ -7,6 +7,8 @@
#ifndef TST_NUMA_H__
#define TST_NUMA_H__
+#include <string.h>
+
/**
* Numa nodemap.
*/
diff --git a/lib/tst_af_alg.c b/lib/tst_af_alg.c
index 97be548b4..edf8c0140 100644
--- a/lib/tst_af_alg.c
+++ b/lib/tst_af_alg.c
@@ -5,6 +5,7 @@
#include <errno.h>
#include <stdlib.h>
+#include <string.h>
#define TST_NO_DEFAULT_MAIN
#include "tst_test.h"
diff --git a/testcases/kernel/syscalls/acct/acct01.c b/testcases/kernel/syscalls/acct/acct01.c
index f58e02584..40316db2e 100644
--- a/testcases/kernel/syscalls/acct/acct01.c
+++ b/testcases/kernel/syscalls/acct/acct01.c
@@ -14,6 +14,7 @@
#include <pwd.h>
#include <stdio.h>
#include <stdlib.h>
+#include <string.h>
#include <unistd.h>
#include <sys/mount.h>
diff --git a/testcases/kernel/syscalls/add_key/add_key02.c b/testcases/kernel/syscalls/add_key/add_key02.c
index 6d19ff2d8..85bd7b150 100644
--- a/testcases/kernel/syscalls/add_key/add_key02.c
+++ b/testcases/kernel/syscalls/add_key/add_key02.c
@@ -35,6 +35,7 @@
*/
#include <errno.h>
+#include <string.h>
#include "tst_test.h"
#include "lapi/keyctl.h"
diff --git a/testcases/kernel/syscalls/chmod/chmod06.c b/testcases/kernel/syscalls/chmod/chmod06.c
index e5bb58fc5..468c7b33d 100644
--- a/testcases/kernel/syscalls/chmod/chmod06.c
+++ b/testcases/kernel/syscalls/chmod/chmod06.c
@@ -39,6 +39,7 @@
*/
#include <pwd.h>
#include <errno.h>
+#include <string.h>
#include "tst_test.h"
#define MODE_RWX (S_IRWXU|S_IRWXG|S_IRWXO)
diff --git a/testcases/kernel/syscalls/clock_adjtime/clock_adjtime01.c b/testcases/kernel/syscalls/clock_adjtime/clock_adjtime01.c
index 6eac1f25c..b48703101 100644
--- a/testcases/kernel/syscalls/clock_adjtime/clock_adjtime01.c
+++ b/testcases/kernel/syscalls/clock_adjtime/clock_adjtime01.c
@@ -54,6 +54,7 @@
* ro STA_CLK - clock source. unused.
*/
+#include <string.h>
#include "clock_adjtime.h"
static long hz;
diff --git a/testcases/kernel/syscalls/clock_adjtime/clock_adjtime02.c b/testcases/kernel/syscalls/clock_adjtime/clock_adjtime02.c
index 1ce936f96..e73bc8943 100644
--- a/testcases/kernel/syscalls/clock_adjtime/clock_adjtime02.c
+++ b/testcases/kernel/syscalls/clock_adjtime/clock_adjtime02.c
@@ -55,6 +55,7 @@
* ro STA_CLK - clock source. unused.
*/
+#include <string.h>
#include "clock_adjtime.h"
static long hz;
diff --git a/testcases/kernel/syscalls/copy_file_range/copy_file_range01.c b/testcases/kernel/syscalls/copy_file_range/copy_file_range01.c
index 2bca8a403..61a6042d9 100644
--- a/testcases/kernel/syscalls/copy_file_range/copy_file_range01.c
+++ b/testcases/kernel/syscalls/copy_file_range/copy_file_range01.c
@@ -15,6 +15,7 @@
#define _GNU_SOURCE
#include <stdio.h>
#include <errno.h>
+#include <stdlib.h>
#include "tst_test.h"
#include "tst_safe_stdio.h"
#include "lapi/syscalls.h"
diff --git a/testcases/kernel/syscalls/epoll_ctl/epoll_ctl01.c b/testcases/kernel/syscalls/epoll_ctl/epoll_ctl01.c
index e837913fb..4be106bc6 100644
--- a/testcases/kernel/syscalls/epoll_ctl/epoll_ctl01.c
+++ b/testcases/kernel/syscalls/epoll_ctl/epoll_ctl01.c
@@ -32,6 +32,7 @@
#include <sys/epoll.h>
#include <poll.h>
#include <string.h>
+#include <strings.h>
#include <errno.h>
#include "tst_test.h"
diff --git a/testcases/kernel/syscalls/epoll_wait/epoll_wait01.c b/testcases/kernel/syscalls/epoll_wait/epoll_wait01.c
index 0ded12765..6099b84aa 100644
--- a/testcases/kernel/syscalls/epoll_wait/epoll_wait01.c
+++ b/testcases/kernel/syscalls/epoll_wait/epoll_wait01.c
@@ -26,6 +26,7 @@
#include <sys/epoll.h>
#include <poll.h>
#include <string.h>
+#include <strings.h>
#include <errno.h>
#include "tst_test.h"
diff --git a/testcases/kernel/syscalls/execl/execl01_child.c b/testcases/kernel/syscalls/execl/execl01_child.c
index 8a6e5123f..84f34428d 100644
--- a/testcases/kernel/syscalls/execl/execl01_child.c
+++ b/testcases/kernel/syscalls/execl/execl01_child.c
@@ -16,6 +16,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#include <string.h>
+
#define TST_NO_DEFAULT_MAIN
#include "tst_test.h"
diff --git a/testcases/kernel/syscalls/execle/execle01_child.c b/testcases/kernel/syscalls/execle/execle01_child.c
index 0ebfaa876..315c8afbf 100644
--- a/testcases/kernel/syscalls/execle/execle01_child.c
+++ b/testcases/kernel/syscalls/execle/execle01_child.c
@@ -16,8 +16,10 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#define TST_NO_DEFAULT_MAIN
#include <stdlib.h>
+#include <string.h>
+
+#define TST_NO_DEFAULT_MAIN
#include "tst_test.h"
int main(int argc, char *argv[])
diff --git a/testcases/kernel/syscalls/execlp/execlp01_child.c b/testcases/kernel/syscalls/execlp/execlp01_child.c
index 8a6e5123f..84f34428d 100644
--- a/testcases/kernel/syscalls/execlp/execlp01_child.c
+++ b/testcases/kernel/syscalls/execlp/execlp01_child.c
@@ -16,6 +16,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#include <string.h>
+
#define TST_NO_DEFAULT_MAIN
#include "tst_test.h"
diff --git a/testcases/kernel/syscalls/execv/execv01_child.c b/testcases/kernel/syscalls/execv/execv01_child.c
index 307810c63..8272df67b 100644
--- a/testcases/kernel/syscalls/execv/execv01_child.c
+++ b/testcases/kernel/syscalls/execv/execv01_child.c
@@ -20,6 +20,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#include <string.h>
+
#define TST_NO_DEFAULT_MAIN
#include "tst_test.h"
diff --git a/testcases/kernel/syscalls/execve/execve01_child.c b/testcases/kernel/syscalls/execve/execve01_child.c
index 0ebfaa876..315c8afbf 100644
--- a/testcases/kernel/syscalls/execve/execve01_child.c
+++ b/testcases/kernel/syscalls/execve/execve01_child.c
@@ -16,8 +16,10 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#define TST_NO_DEFAULT_MAIN
#include <stdlib.h>
+#include <string.h>
+
+#define TST_NO_DEFAULT_MAIN
#include "tst_test.h"
int main(int argc, char *argv[])
diff --git a/testcases/kernel/syscalls/execve/execve_child.c b/testcases/kernel/syscalls/execve/execve_child.c
index bcf8ccc69..0402ee325 100644
--- a/testcases/kernel/syscalls/execve/execve_child.c
+++ b/testcases/kernel/syscalls/execve/execve_child.c
@@ -21,8 +21,10 @@
* dummy program which is used by execve02/4/5.c testcase
*/
-#define TST_NO_DEFAULT_MAIN
#include <stdlib.h>
+#include <string.h>
+
+#define TST_NO_DEFAULT_MAIN
#include "tst_test.h"
int main(int argc, char *argv[])
diff --git a/testcases/kernel/syscalls/execvp/execvp01_child.c b/testcases/kernel/syscalls/execvp/execvp01_child.c
index 8a6e5123f..84f34428d 100644
--- a/testcases/kernel/syscalls/execvp/execvp01_child.c
+++ b/testcases/kernel/syscalls/execvp/execvp01_child.c
@@ -16,6 +16,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#include <string.h>
+
#define TST_NO_DEFAULT_MAIN
#include "tst_test.h"
diff --git a/testcases/kernel/syscalls/exit/exit02.c b/testcases/kernel/syscalls/exit/exit02.c
index fa9639704..69132e973 100644
--- a/testcases/kernel/syscalls/exit/exit02.c
+++ b/testcases/kernel/syscalls/exit/exit02.c
@@ -25,6 +25,7 @@
*/
#include <stdlib.h>
+#include <string.h>
#include "tst_test.h"
#define FNAME "test_file"
diff --git a/testcases/kernel/syscalls/getcwd/getcwd04.c b/testcases/kernel/syscalls/getcwd/getcwd04.c
index ba8c358f6..fd8524bb4 100644
--- a/testcases/kernel/syscalls/getcwd/getcwd04.c
+++ b/testcases/kernel/syscalls/getcwd/getcwd04.c
@@ -37,6 +37,7 @@
#include <fcntl.h>
#include <sys/types.h>
#include <unistd.h>
+#include <string.h>
#include "tst_test.h"
#define TIMEOUT 5
diff --git a/testcases/kernel/syscalls/getrandom/getrandom02.c b/testcases/kernel/syscalls/getrandom/getrandom02.c
index e7d03e799..bb4908c92 100644
--- a/testcases/kernel/syscalls/getrandom/getrandom02.c
+++ b/testcases/kernel/syscalls/getrandom/getrandom02.c
@@ -27,6 +27,8 @@
*
*/
+#include <string.h>
+
#include "lapi/getrandom.h"
#include "lapi/syscalls.h"
#include "tst_test.h"
diff --git a/testcases/kernel/syscalls/ioctl/ioctl08.c b/testcases/kernel/syscalls/ioctl/ioctl08.c
index 8de80048c..2c01749ae 100644
--- a/testcases/kernel/syscalls/ioctl/ioctl08.c
+++ b/testcases/kernel/syscalls/ioctl/ioctl08.c
@@ -20,6 +20,7 @@
#include <stdlib.h>
#include <sys/ioctl.h>
#include <errno.h>
+#include <string.h>
#include "tst_test.h"
#ifdef HAVE_STRUCT_FILE_DEDUPE_RANGE
diff --git a/testcases/kernel/syscalls/keyctl/keyctl05.c b/testcases/kernel/syscalls/keyctl/keyctl05.c
index e2ed8ad48..1bf9066db 100644
--- a/testcases/kernel/syscalls/keyctl/keyctl05.c
+++ b/testcases/kernel/syscalls/keyctl/keyctl05.c
@@ -39,6 +39,7 @@
#include <errno.h>
#include <stdlib.h>
+#include <string.h>
#include "tst_test.h"
#include "lapi/keyctl.h"
diff --git a/testcases/kernel/syscalls/keyctl/keyctl06.c b/testcases/kernel/syscalls/keyctl/keyctl06.c
index bab26ee5c..cf95e2b80 100644
--- a/testcases/kernel/syscalls/keyctl/keyctl06.c
+++ b/testcases/kernel/syscalls/keyctl/keyctl06.c
@@ -29,6 +29,7 @@
*/
#include <errno.h>
+#include <string.h>
#include "tst_test.h"
#include "lapi/keyctl.h"
diff --git a/testcases/kernel/syscalls/link/link08.c b/testcases/kernel/syscalls/link/link08.c
index 775c0c27b..be3872d64 100644
--- a/testcases/kernel/syscalls/link/link08.c
+++ b/testcases/kernel/syscalls/link/link08.c
@@ -32,6 +32,7 @@
* if too many symbolic links were encountered in resolving path.
*/
#include <errno.h>
+#include <string.h>
#include "tst_test.h"
#define DIR_MODE (S_IRUSR|S_IWUSR|S_IXUSR|S_IRGRP| \
diff --git a/testcases/kernel/syscalls/listxattr/listxattr02.c b/testcases/kernel/syscalls/listxattr/listxattr02.c
index 33f57d567..b512e10b7 100644
--- a/testcases/kernel/syscalls/listxattr/listxattr02.c
+++ b/testcases/kernel/syscalls/listxattr/listxattr02.c
@@ -35,6 +35,7 @@
#include "config.h"
#include <errno.h>
+#include <string.h>
#include <sys/types.h>
#ifdef HAVE_SYS_XATTR_H
diff --git a/testcases/kernel/syscalls/llistxattr/llistxattr02.c b/testcases/kernel/syscalls/llistxattr/llistxattr02.c
index d239e97bf..c444bae0b 100644
--- a/testcases/kernel/syscalls/llistxattr/llistxattr02.c
+++ b/testcases/kernel/syscalls/llistxattr/llistxattr02.c
@@ -33,6 +33,7 @@
#include "config.h"
#include <errno.h>
+#include <string.h>
#include <sys/types.h>
#ifdef HAVE_SYS_XATTR_H
diff --git a/testcases/kernel/syscalls/lremovexattr/lremovexattr01.c b/testcases/kernel/syscalls/lremovexattr/lremovexattr01.c
index 26194f114..38cb6d6be 100644
--- a/testcases/kernel/syscalls/lremovexattr/lremovexattr01.c
+++ b/testcases/kernel/syscalls/lremovexattr/lremovexattr01.c
@@ -26,6 +26,7 @@
#include <errno.h>
#include <stdlib.h>
#include <stdio.h>
+#include <string.h>
#include <unistd.h>
#include <fcntl.h>
diff --git a/testcases/kernel/syscalls/madvise/madvise10.c b/testcases/kernel/syscalls/madvise/madvise10.c
index ca0b9f39b..e0099fc73 100644
--- a/testcases/kernel/syscalls/madvise/madvise10.c
+++ b/testcases/kernel/syscalls/madvise/madvise10.c
@@ -54,6 +54,7 @@
#include <errno.h>
#include <unistd.h>
#include <stdlib.h>
+#include <string.h>
#include "lapi/mmap.h"
#include "tst_test.h"
diff --git a/testcases/kernel/syscalls/mkdir/mkdir03.c b/testcases/kernel/syscalls/mkdir/mkdir03.c
index 8cadf9c21..74d39c466 100644
--- a/testcases/kernel/syscalls/mkdir/mkdir03.c
+++ b/testcases/kernel/syscalls/mkdir/mkdir03.c
@@ -28,6 +28,7 @@
#include <sys/mman.h>
#include <fcntl.h>
#include <sys/mount.h>
+#include <string.h>
#include "tst_test.h"
diff --git a/testcases/kernel/syscalls/read/read01.c b/testcases/kernel/syscalls/read/read01.c
index 68aea0917..798e67b95 100644
--- a/testcases/kernel/syscalls/read/read01.c
+++ b/testcases/kernel/syscalls/read/read01.c
@@ -32,6 +32,7 @@
*/
#include <errno.h>
+#include <string.h>
#include "tst_test.h"
#define SIZE 512
diff --git a/testcases/kernel/syscalls/request_key/request_key03.c b/testcases/kernel/syscalls/request_key/request_key03.c
index 9996a6f87..50d024e2e 100644
--- a/testcases/kernel/syscalls/request_key/request_key03.c
+++ b/testcases/kernel/syscalls/request_key/request_key03.c
@@ -44,6 +44,7 @@
#include <errno.h>
#include <stdbool.h>
#include <stdlib.h>
+#include <string.h>
#include <sys/wait.h>
#include "tst_test.h"
diff --git a/testcases/kernel/syscalls/rmdir/rmdir02.c b/testcases/kernel/syscalls/rmdir/rmdir02.c
index 3f3669213..6f4fa405a 100644
--- a/testcases/kernel/syscalls/rmdir/rmdir02.c
+++ b/testcases/kernel/syscalls/rmdir/rmdir02.c
@@ -28,6 +28,7 @@
*/
#include <errno.h>
+#include <string.h>
#include "tst_test.h"
diff --git a/testcases/kernel/syscalls/setsockopt/setsockopt03.c b/testcases/kernel/syscalls/setsockopt/setsockopt03.c
index 2d99865b7..42952e98d 100644
--- a/testcases/kernel/syscalls/setsockopt/setsockopt03.c
+++ b/testcases/kernel/syscalls/setsockopt/setsockopt03.c
@@ -28,6 +28,7 @@
*/
#include <stdint.h>
+#include <string.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
diff --git a/testcases/kernel/syscalls/write/write03.c b/testcases/kernel/syscalls/write/write03.c
index 7e3ec98df..61480c306 100644
--- a/testcases/kernel/syscalls/write/write03.c
+++ b/testcases/kernel/syscalls/write/write03.c
@@ -31,6 +31,7 @@
*/
#include <stdio.h>
+#include <string.h>
#include <errno.h>
#include "tst_test.h"
diff --git a/testcases/kernel/syscalls/writev/writev07.c b/testcases/kernel/syscalls/writev/writev07.c
index ec883ed15..c7d03dae0 100644
--- a/testcases/kernel/syscalls/writev/writev07.c
+++ b/testcases/kernel/syscalls/writev/writev07.c
@@ -32,6 +32,7 @@
#include <errno.h>
#include <fcntl.h>
#include <stdio.h>
+#include <string.h>
#include <sys/mman.h>
#include <sys/stat.h>
#include <sys/types.h>
diff --git a/testcases/lib/tst_checkpoint.c b/testcases/lib/tst_checkpoint.c
index 57c7bc1bb..fd18c146d 100644
--- a/testcases/lib/tst_checkpoint.c
+++ b/testcases/lib/tst_checkpoint.c
@@ -20,6 +20,7 @@
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
+#include <string.h>
#define TST_NO_DEFAULT_MAIN
#include "tst_test.h"
diff --git a/testcases/lib/tst_device.c b/testcases/lib/tst_device.c
index 1cfdc962c..73d2e7dcb 100644
--- a/testcases/lib/tst_device.c
+++ b/testcases/lib/tst_device.c
@@ -20,6 +20,7 @@
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
+#include <string.h>
#define TST_NO_DEFAULT_MAIN
#include "tst_test.h"
#include "old/old_device.h"
diff --git a/testcases/lib/tst_kvcmp.c b/testcases/lib/tst_kvcmp.c
index 06632a278..0405d9d9e 100644
--- a/testcases/lib/tst_kvcmp.c
+++ b/testcases/lib/tst_kvcmp.c
@@ -19,6 +19,7 @@
#define TST_NO_DEFAULT_MAIN
#include <stdio.h>
#include <stdlib.h>
+#include <string.h>
#include <sys/utsname.h>
#include <tst_test.h>
diff --git a/testcases/network/sctp/sctp_big_chunk.c b/testcases/network/sctp/sctp_big_chunk.c
index 4ebdcb20f..32c350af2 100644
--- a/testcases/network/sctp/sctp_big_chunk.c
+++ b/testcases/network/sctp/sctp_big_chunk.c
@@ -14,6 +14,7 @@
#include <netinet/ip.h>
#include <netinet/ip6.h>
#include <netdb.h>
+#include <string.h>
#include <sys/syscall.h>
#include "tst_test.h"
--
2.20.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [LTP] [RFC PATCH 3/3] make: Add -Werror-implicit-function-declaration for all targets
2019-04-11 23:31 [LTP] [PATCH 0/3][RFC] Android fixes and -Werror-implicit-function-declaration as default Petr Vorel
2019-04-11 23:31 ` [LTP] [RFC PATCH 1/3] cve/cve-2014-0196: Don't use libutil for Android Petr Vorel
2019-04-11 23:31 ` [LTP] [RFC PATCH 2/3] Add more missing <string.h> and <strings.h> includes Petr Vorel
@ 2019-04-11 23:31 ` Petr Vorel
2019-07-12 13:48 ` Petr Vorel
2 siblings, 1 reply; 16+ messages in thread
From: Petr Vorel @ 2019-04-11 23:31 UTC (permalink / raw)
To: ltp
Previously it was passed only to Android build, but it's good to check
it for all.
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
Tested in travis:
https://travis-ci.org/pevik/ltp/builds/518886113
---
include/mk/env_post.mk | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/include/mk/env_post.mk b/include/mk/env_post.mk
index 913bdf5d1..3ffdd0b7f 100644
--- a/include/mk/env_post.mk
+++ b/include/mk/env_post.mk
@@ -41,11 +41,9 @@ ifeq ($(UCLINUX),1)
CPPFLAGS += -D__UCLIBC__ -DUCLINUX
endif
-ifeq ($(ANDROID),1)
-# There are many undeclared functions, it's best not to accidentally overlook
-# them.
CFLAGS += -Werror-implicit-function-declaration
+ifeq ($(ANDROID),1)
LDFLAGS += -L$(top_builddir)/lib/android_libpthread
LDFLAGS += -L$(top_builddir)/lib/android_librt
endif
--
2.20.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [LTP] [RFC PATCH 2/3] Add more missing <string.h> and <strings.h> includes
2019-04-11 23:31 ` [LTP] [RFC PATCH 2/3] Add more missing <string.h> and <strings.h> includes Petr Vorel
@ 2019-04-12 2:12 ` =?unknown-8bit?b?6Ziu5q2j5pe6?=
2019-04-12 8:49 ` Cyril Hrubis
0 siblings, 1 reply; 16+ messages in thread
From: =?unknown-8bit?b?6Ziu5q2j5pe6?= @ 2019-04-12 2:12 UTC (permalink / raw)
To: ltp
Hi Petr,
-------- Original Message --------
From: Petr Vorel
Sent: Fri, 12 Apr 2019 01:31:14 +0200
To: Ltp
Cc: Petr Vorel, Sandeep Patil, Steve Muckle, Zhengwang Ruan, Cyril
Hrubis, Petr Vorel
Subject: [RFC PATCH 2/3] Add more missing <string.h> and <strings.h>
includes
> From: Petr Vorel <petr.vorel@gmail.com>
>
> Signed-off-by: Petr Vorel <petr.vorel@gmail.com>
> Signed-off-by: Petr Vorel <pvorel@suse.cz>
> ---
> Instead of this one [1] can be chosen or this can be rebased on [1]
> (commit after [1]). I created it few weeks ago, but didn't consider it
> reasonable to be added. But with next commit, which adds
> -Werror-implicit-function-declaration for all IMHO it makes sense.
>
> Other users of strcmp() and friends aren't causing a failure, probably
> due other header including <string.h>.
>
> Kind regards,
> Petr
>
> [1] http://lists.linux.it/pipermail/ltp/2019-April/011643.html
> ---
> include/tst_net.h | 1 +
> include/tst_numa.h | 2 ++
> lib/tst_af_alg.c | 1 +
> testcases/kernel/syscalls/acct/acct01.c | 1 +
> testcases/kernel/syscalls/add_key/add_key02.c | 1 +
> testcases/kernel/syscalls/chmod/chmod06.c | 1 +
> testcases/kernel/syscalls/clock_adjtime/clock_adjtime01.c | 1 +
> testcases/kernel/syscalls/clock_adjtime/clock_adjtime02.c | 1 +
> testcases/kernel/syscalls/copy_file_range/copy_file_range01.c | 1 +
> testcases/kernel/syscalls/epoll_ctl/epoll_ctl01.c | 1 +
> testcases/kernel/syscalls/epoll_wait/epoll_wait01.c | 1 +
> testcases/kernel/syscalls/execl/execl01_child.c | 2 ++
> testcases/kernel/syscalls/execle/execle01_child.c | 4 +++-
> testcases/kernel/syscalls/execlp/execlp01_child.c | 2 ++
> testcases/kernel/syscalls/execv/execv01_child.c | 2 ++
> testcases/kernel/syscalls/execve/execve01_child.c | 4 +++-
> testcases/kernel/syscalls/execve/execve_child.c | 4 +++-
> testcases/kernel/syscalls/execvp/execvp01_child.c | 2 ++
> testcases/kernel/syscalls/exit/exit02.c | 1 +
> testcases/kernel/syscalls/getcwd/getcwd04.c | 1 +
> testcases/kernel/syscalls/getrandom/getrandom02.c | 2 ++
> testcases/kernel/syscalls/ioctl/ioctl08.c | 1 +
> testcases/kernel/syscalls/keyctl/keyctl05.c | 1 +
> testcases/kernel/syscalls/keyctl/keyctl06.c | 1 +
> testcases/kernel/syscalls/link/link08.c | 1 +
> testcases/kernel/syscalls/listxattr/listxattr02.c | 1 +
> testcases/kernel/syscalls/llistxattr/llistxattr02.c | 1 +
> testcases/kernel/syscalls/lremovexattr/lremovexattr01.c | 1 +
> testcases/kernel/syscalls/madvise/madvise10.c | 1 +
> testcases/kernel/syscalls/mkdir/mkdir03.c | 1 +
> testcases/kernel/syscalls/read/read01.c | 1 +
> testcases/kernel/syscalls/request_key/request_key03.c | 1 +
> testcases/kernel/syscalls/rmdir/rmdir02.c | 1 +
> testcases/kernel/syscalls/setsockopt/setsockopt03.c | 1 +
> testcases/kernel/syscalls/write/write03.c | 1 +
> testcases/kernel/syscalls/writev/writev07.c | 1 +
> testcases/lib/tst_checkpoint.c | 1 +
> testcases/lib/tst_device.c | 1 +
> testcases/lib/tst_kvcmp.c | 1 +
> testcases/network/sctp/sctp_big_chunk.c | 1 +
> 40 files changed, 52 insertions(+), 3 deletions(-)
>
> diff --git a/include/tst_net.h b/include/tst_net.h
> index cb97b7b61..971d5ec2c 100644
> --- a/include/tst_net.h
> +++ b/include/tst_net.h
> @@ -17,6 +17,7 @@
>
> #include <arpa/inet.h>
> #include <errno.h>
> +#include <string.h>
>
> #define MAX_IPV4_PREFIX 32
> #define MAX_IPV6_PREFIX 128
> diff --git a/include/tst_numa.h b/include/tst_numa.h
> index a4cd1be37..4f9806602 100644
> --- a/include/tst_numa.h
> +++ b/include/tst_numa.h
> @@ -7,6 +7,8 @@
> #ifndef TST_NUMA_H__
> #define TST_NUMA_H__
>
> +#include <string.h>
> +
> /**
> * Numa nodemap.
> */
> diff --git a/lib/tst_af_alg.c b/lib/tst_af_alg.c
> index 97be548b4..edf8c0140 100644
> --- a/lib/tst_af_alg.c
> +++ b/lib/tst_af_alg.c
> @@ -5,6 +5,7 @@
>
> #include <errno.h>
> #include <stdlib.h>
> +#include <string.h>
Why not simply include <string.h> in tst_test.h. I did it in my another
review thread. This should be OK for most of cases.
Regards,
Zhengwang
>
> #define TST_NO_DEFAULT_MAIN
> #include "tst_test.h"
> diff --git a/testcases/kernel/syscalls/acct/acct01.c b/testcases/kernel/syscalls/acct/acct01.c
> index f58e02584..40316db2e 100644
> --- a/testcases/kernel/syscalls/acct/acct01.c
> +++ b/testcases/kernel/syscalls/acct/acct01.c
> @@ -14,6 +14,7 @@
> #include <pwd.h>
> #include <stdio.h>
> #include <stdlib.h>
> +#include <string.h>
> #include <unistd.h>
> #include <sys/mount.h>
>
> diff --git a/testcases/kernel/syscalls/add_key/add_key02.c b/testcases/kernel/syscalls/add_key/add_key02.c
> index 6d19ff2d8..85bd7b150 100644
> --- a/testcases/kernel/syscalls/add_key/add_key02.c
> +++ b/testcases/kernel/syscalls/add_key/add_key02.c
> @@ -35,6 +35,7 @@
> */
>
> #include <errno.h>
> +#include <string.h>
>
> #include "tst_test.h"
> #include "lapi/keyctl.h"
> diff --git a/testcases/kernel/syscalls/chmod/chmod06.c b/testcases/kernel/syscalls/chmod/chmod06.c
> index e5bb58fc5..468c7b33d 100644
> --- a/testcases/kernel/syscalls/chmod/chmod06.c
> +++ b/testcases/kernel/syscalls/chmod/chmod06.c
> @@ -39,6 +39,7 @@
> */
> #include <pwd.h>
> #include <errno.h>
> +#include <string.h>
> #include "tst_test.h"
>
> #define MODE_RWX (S_IRWXU|S_IRWXG|S_IRWXO)
> diff --git a/testcases/kernel/syscalls/clock_adjtime/clock_adjtime01.c b/testcases/kernel/syscalls/clock_adjtime/clock_adjtime01.c
> index 6eac1f25c..b48703101 100644
> --- a/testcases/kernel/syscalls/clock_adjtime/clock_adjtime01.c
> +++ b/testcases/kernel/syscalls/clock_adjtime/clock_adjtime01.c
> @@ -54,6 +54,7 @@
> * ro STA_CLK - clock source. unused.
> */
>
> +#include <string.h>
> #include "clock_adjtime.h"
>
> static long hz;
> diff --git a/testcases/kernel/syscalls/clock_adjtime/clock_adjtime02.c b/testcases/kernel/syscalls/clock_adjtime/clock_adjtime02.c
> index 1ce936f96..e73bc8943 100644
> --- a/testcases/kernel/syscalls/clock_adjtime/clock_adjtime02.c
> +++ b/testcases/kernel/syscalls/clock_adjtime/clock_adjtime02.c
> @@ -55,6 +55,7 @@
> * ro STA_CLK - clock source. unused.
> */
>
> +#include <string.h>
> #include "clock_adjtime.h"
>
> static long hz;
> diff --git a/testcases/kernel/syscalls/copy_file_range/copy_file_range01.c b/testcases/kernel/syscalls/copy_file_range/copy_file_range01.c
> index 2bca8a403..61a6042d9 100644
> --- a/testcases/kernel/syscalls/copy_file_range/copy_file_range01.c
> +++ b/testcases/kernel/syscalls/copy_file_range/copy_file_range01.c
> @@ -15,6 +15,7 @@
> #define _GNU_SOURCE
> #include <stdio.h>
> #include <errno.h>
> +#include <stdlib.h>
> #include "tst_test.h"
> #include "tst_safe_stdio.h"
> #include "lapi/syscalls.h"
> diff --git a/testcases/kernel/syscalls/epoll_ctl/epoll_ctl01.c b/testcases/kernel/syscalls/epoll_ctl/epoll_ctl01.c
> index e837913fb..4be106bc6 100644
> --- a/testcases/kernel/syscalls/epoll_ctl/epoll_ctl01.c
> +++ b/testcases/kernel/syscalls/epoll_ctl/epoll_ctl01.c
> @@ -32,6 +32,7 @@
> #include <sys/epoll.h>
> #include <poll.h>
> #include <string.h>
> +#include <strings.h>
> #include <errno.h>
> #include "tst_test.h"
>
> diff --git a/testcases/kernel/syscalls/epoll_wait/epoll_wait01.c b/testcases/kernel/syscalls/epoll_wait/epoll_wait01.c
> index 0ded12765..6099b84aa 100644
> --- a/testcases/kernel/syscalls/epoll_wait/epoll_wait01.c
> +++ b/testcases/kernel/syscalls/epoll_wait/epoll_wait01.c
> @@ -26,6 +26,7 @@
> #include <sys/epoll.h>
> #include <poll.h>
> #include <string.h>
> +#include <strings.h>
> #include <errno.h>
>
> #include "tst_test.h"
> diff --git a/testcases/kernel/syscalls/execl/execl01_child.c b/testcases/kernel/syscalls/execl/execl01_child.c
> index 8a6e5123f..84f34428d 100644
> --- a/testcases/kernel/syscalls/execl/execl01_child.c
> +++ b/testcases/kernel/syscalls/execl/execl01_child.c
> @@ -16,6 +16,8 @@
> * along with this program. If not, see <http://www.gnu.org/licenses/>.
> */
>
> +#include <string.h>
> +
> #define TST_NO_DEFAULT_MAIN
> #include "tst_test.h"
>
> diff --git a/testcases/kernel/syscalls/execle/execle01_child.c b/testcases/kernel/syscalls/execle/execle01_child.c
> index 0ebfaa876..315c8afbf 100644
> --- a/testcases/kernel/syscalls/execle/execle01_child.c
> +++ b/testcases/kernel/syscalls/execle/execle01_child.c
> @@ -16,8 +16,10 @@
> * along with this program. If not, see <http://www.gnu.org/licenses/>.
> */
>
> -#define TST_NO_DEFAULT_MAIN
> #include <stdlib.h>
> +#include <string.h>
> +
> +#define TST_NO_DEFAULT_MAIN
> #include "tst_test.h"
>
> int main(int argc, char *argv[])
> diff --git a/testcases/kernel/syscalls/execlp/execlp01_child.c b/testcases/kernel/syscalls/execlp/execlp01_child.c
> index 8a6e5123f..84f34428d 100644
> --- a/testcases/kernel/syscalls/execlp/execlp01_child.c
> +++ b/testcases/kernel/syscalls/execlp/execlp01_child.c
> @@ -16,6 +16,8 @@
> * along with this program. If not, see <http://www.gnu.org/licenses/>.
> */
>
> +#include <string.h>
> +
> #define TST_NO_DEFAULT_MAIN
> #include "tst_test.h"
>
> diff --git a/testcases/kernel/syscalls/execv/execv01_child.c b/testcases/kernel/syscalls/execv/execv01_child.c
> index 307810c63..8272df67b 100644
> --- a/testcases/kernel/syscalls/execv/execv01_child.c
> +++ b/testcases/kernel/syscalls/execv/execv01_child.c
> @@ -20,6 +20,8 @@
> * along with this program. If not, see <http://www.gnu.org/licenses/>.
> */
>
> +#include <string.h>
> +
> #define TST_NO_DEFAULT_MAIN
> #include "tst_test.h"
>
> diff --git a/testcases/kernel/syscalls/execve/execve01_child.c b/testcases/kernel/syscalls/execve/execve01_child.c
> index 0ebfaa876..315c8afbf 100644
> --- a/testcases/kernel/syscalls/execve/execve01_child.c
> +++ b/testcases/kernel/syscalls/execve/execve01_child.c
> @@ -16,8 +16,10 @@
> * along with this program. If not, see <http://www.gnu.org/licenses/>.
> */
>
> -#define TST_NO_DEFAULT_MAIN
> #include <stdlib.h>
> +#include <string.h>
> +
> +#define TST_NO_DEFAULT_MAIN
> #include "tst_test.h"
>
> int main(int argc, char *argv[])
> diff --git a/testcases/kernel/syscalls/execve/execve_child.c b/testcases/kernel/syscalls/execve/execve_child.c
> index bcf8ccc69..0402ee325 100644
> --- a/testcases/kernel/syscalls/execve/execve_child.c
> +++ b/testcases/kernel/syscalls/execve/execve_child.c
> @@ -21,8 +21,10 @@
> * dummy program which is used by execve02/4/5.c testcase
> */
>
> -#define TST_NO_DEFAULT_MAIN
> #include <stdlib.h>
> +#include <string.h>
> +
> +#define TST_NO_DEFAULT_MAIN
> #include "tst_test.h"
>
> int main(int argc, char *argv[])
> diff --git a/testcases/kernel/syscalls/execvp/execvp01_child.c b/testcases/kernel/syscalls/execvp/execvp01_child.c
> index 8a6e5123f..84f34428d 100644
> --- a/testcases/kernel/syscalls/execvp/execvp01_child.c
> +++ b/testcases/kernel/syscalls/execvp/execvp01_child.c
> @@ -16,6 +16,8 @@
> * along with this program. If not, see <http://www.gnu.org/licenses/>.
> */
>
> +#include <string.h>
> +
> #define TST_NO_DEFAULT_MAIN
> #include "tst_test.h"
>
> diff --git a/testcases/kernel/syscalls/exit/exit02.c b/testcases/kernel/syscalls/exit/exit02.c
> index fa9639704..69132e973 100644
> --- a/testcases/kernel/syscalls/exit/exit02.c
> +++ b/testcases/kernel/syscalls/exit/exit02.c
> @@ -25,6 +25,7 @@
> */
>
> #include <stdlib.h>
> +#include <string.h>
> #include "tst_test.h"
>
> #define FNAME "test_file"
> diff --git a/testcases/kernel/syscalls/getcwd/getcwd04.c b/testcases/kernel/syscalls/getcwd/getcwd04.c
> index ba8c358f6..fd8524bb4 100644
> --- a/testcases/kernel/syscalls/getcwd/getcwd04.c
> +++ b/testcases/kernel/syscalls/getcwd/getcwd04.c
> @@ -37,6 +37,7 @@
> #include <fcntl.h>
> #include <sys/types.h>
> #include <unistd.h>
> +#include <string.h>
> #include "tst_test.h"
>
> #define TIMEOUT 5
> diff --git a/testcases/kernel/syscalls/getrandom/getrandom02.c b/testcases/kernel/syscalls/getrandom/getrandom02.c
> index e7d03e799..bb4908c92 100644
> --- a/testcases/kernel/syscalls/getrandom/getrandom02.c
> +++ b/testcases/kernel/syscalls/getrandom/getrandom02.c
> @@ -27,6 +27,8 @@
> *
> */
>
> +#include <string.h>
> +
> #include "lapi/getrandom.h"
> #include "lapi/syscalls.h"
> #include "tst_test.h"
> diff --git a/testcases/kernel/syscalls/ioctl/ioctl08.c b/testcases/kernel/syscalls/ioctl/ioctl08.c
> index 8de80048c..2c01749ae 100644
> --- a/testcases/kernel/syscalls/ioctl/ioctl08.c
> +++ b/testcases/kernel/syscalls/ioctl/ioctl08.c
> @@ -20,6 +20,7 @@
> #include <stdlib.h>
> #include <sys/ioctl.h>
> #include <errno.h>
> +#include <string.h>
> #include "tst_test.h"
>
> #ifdef HAVE_STRUCT_FILE_DEDUPE_RANGE
> diff --git a/testcases/kernel/syscalls/keyctl/keyctl05.c b/testcases/kernel/syscalls/keyctl/keyctl05.c
> index e2ed8ad48..1bf9066db 100644
> --- a/testcases/kernel/syscalls/keyctl/keyctl05.c
> +++ b/testcases/kernel/syscalls/keyctl/keyctl05.c
> @@ -39,6 +39,7 @@
>
> #include <errno.h>
> #include <stdlib.h>
> +#include <string.h>
>
> #include "tst_test.h"
> #include "lapi/keyctl.h"
> diff --git a/testcases/kernel/syscalls/keyctl/keyctl06.c b/testcases/kernel/syscalls/keyctl/keyctl06.c
> index bab26ee5c..cf95e2b80 100644
> --- a/testcases/kernel/syscalls/keyctl/keyctl06.c
> +++ b/testcases/kernel/syscalls/keyctl/keyctl06.c
> @@ -29,6 +29,7 @@
> */
>
> #include <errno.h>
> +#include <string.h>
>
> #include "tst_test.h"
> #include "lapi/keyctl.h"
> diff --git a/testcases/kernel/syscalls/link/link08.c b/testcases/kernel/syscalls/link/link08.c
> index 775c0c27b..be3872d64 100644
> --- a/testcases/kernel/syscalls/link/link08.c
> +++ b/testcases/kernel/syscalls/link/link08.c
> @@ -32,6 +32,7 @@
> * if too many symbolic links were encountered in resolving path.
> */
> #include <errno.h>
> +#include <string.h>
> #include "tst_test.h"
>
> #define DIR_MODE (S_IRUSR|S_IWUSR|S_IXUSR|S_IRGRP| \
> diff --git a/testcases/kernel/syscalls/listxattr/listxattr02.c b/testcases/kernel/syscalls/listxattr/listxattr02.c
> index 33f57d567..b512e10b7 100644
> --- a/testcases/kernel/syscalls/listxattr/listxattr02.c
> +++ b/testcases/kernel/syscalls/listxattr/listxattr02.c
> @@ -35,6 +35,7 @@
>
> #include "config.h"
> #include <errno.h>
> +#include <string.h>
> #include <sys/types.h>
>
> #ifdef HAVE_SYS_XATTR_H
> diff --git a/testcases/kernel/syscalls/llistxattr/llistxattr02.c b/testcases/kernel/syscalls/llistxattr/llistxattr02.c
> index d239e97bf..c444bae0b 100644
> --- a/testcases/kernel/syscalls/llistxattr/llistxattr02.c
> +++ b/testcases/kernel/syscalls/llistxattr/llistxattr02.c
> @@ -33,6 +33,7 @@
>
> #include "config.h"
> #include <errno.h>
> +#include <string.h>
> #include <sys/types.h>
>
> #ifdef HAVE_SYS_XATTR_H
> diff --git a/testcases/kernel/syscalls/lremovexattr/lremovexattr01.c b/testcases/kernel/syscalls/lremovexattr/lremovexattr01.c
> index 26194f114..38cb6d6be 100644
> --- a/testcases/kernel/syscalls/lremovexattr/lremovexattr01.c
> +++ b/testcases/kernel/syscalls/lremovexattr/lremovexattr01.c
> @@ -26,6 +26,7 @@
> #include <errno.h>
> #include <stdlib.h>
> #include <stdio.h>
> +#include <string.h>
> #include <unistd.h>
> #include <fcntl.h>
>
> diff --git a/testcases/kernel/syscalls/madvise/madvise10.c b/testcases/kernel/syscalls/madvise/madvise10.c
> index ca0b9f39b..e0099fc73 100644
> --- a/testcases/kernel/syscalls/madvise/madvise10.c
> +++ b/testcases/kernel/syscalls/madvise/madvise10.c
> @@ -54,6 +54,7 @@
> #include <errno.h>
> #include <unistd.h>
> #include <stdlib.h>
> +#include <string.h>
>
> #include "lapi/mmap.h"
> #include "tst_test.h"
> diff --git a/testcases/kernel/syscalls/mkdir/mkdir03.c b/testcases/kernel/syscalls/mkdir/mkdir03.c
> index 8cadf9c21..74d39c466 100644
> --- a/testcases/kernel/syscalls/mkdir/mkdir03.c
> +++ b/testcases/kernel/syscalls/mkdir/mkdir03.c
> @@ -28,6 +28,7 @@
> #include <sys/mman.h>
> #include <fcntl.h>
> #include <sys/mount.h>
> +#include <string.h>
>
> #include "tst_test.h"
>
> diff --git a/testcases/kernel/syscalls/read/read01.c b/testcases/kernel/syscalls/read/read01.c
> index 68aea0917..798e67b95 100644
> --- a/testcases/kernel/syscalls/read/read01.c
> +++ b/testcases/kernel/syscalls/read/read01.c
> @@ -32,6 +32,7 @@
> */
>
> #include <errno.h>
> +#include <string.h>
> #include "tst_test.h"
>
> #define SIZE 512
> diff --git a/testcases/kernel/syscalls/request_key/request_key03.c b/testcases/kernel/syscalls/request_key/request_key03.c
> index 9996a6f87..50d024e2e 100644
> --- a/testcases/kernel/syscalls/request_key/request_key03.c
> +++ b/testcases/kernel/syscalls/request_key/request_key03.c
> @@ -44,6 +44,7 @@
> #include <errno.h>
> #include <stdbool.h>
> #include <stdlib.h>
> +#include <string.h>
> #include <sys/wait.h>
>
> #include "tst_test.h"
> diff --git a/testcases/kernel/syscalls/rmdir/rmdir02.c b/testcases/kernel/syscalls/rmdir/rmdir02.c
> index 3f3669213..6f4fa405a 100644
> --- a/testcases/kernel/syscalls/rmdir/rmdir02.c
> +++ b/testcases/kernel/syscalls/rmdir/rmdir02.c
> @@ -28,6 +28,7 @@
> */
>
> #include <errno.h>
> +#include <string.h>
>
> #include "tst_test.h"
>
> diff --git a/testcases/kernel/syscalls/setsockopt/setsockopt03.c b/testcases/kernel/syscalls/setsockopt/setsockopt03.c
> index 2d99865b7..42952e98d 100644
> --- a/testcases/kernel/syscalls/setsockopt/setsockopt03.c
> +++ b/testcases/kernel/syscalls/setsockopt/setsockopt03.c
> @@ -28,6 +28,7 @@
> */
>
> #include <stdint.h>
> +#include <string.h>
> #include <sys/types.h>
> #include <sys/socket.h>
> #include <netinet/in.h>
> diff --git a/testcases/kernel/syscalls/write/write03.c b/testcases/kernel/syscalls/write/write03.c
> index 7e3ec98df..61480c306 100644
> --- a/testcases/kernel/syscalls/write/write03.c
> +++ b/testcases/kernel/syscalls/write/write03.c
> @@ -31,6 +31,7 @@
> */
>
> #include <stdio.h>
> +#include <string.h>
> #include <errno.h>
> #include "tst_test.h"
>
> diff --git a/testcases/kernel/syscalls/writev/writev07.c b/testcases/kernel/syscalls/writev/writev07.c
> index ec883ed15..c7d03dae0 100644
> --- a/testcases/kernel/syscalls/writev/writev07.c
> +++ b/testcases/kernel/syscalls/writev/writev07.c
> @@ -32,6 +32,7 @@
> #include <errno.h>
> #include <fcntl.h>
> #include <stdio.h>
> +#include <string.h>
> #include <sys/mman.h>
> #include <sys/stat.h>
> #include <sys/types.h>
> diff --git a/testcases/lib/tst_checkpoint.c b/testcases/lib/tst_checkpoint.c
> index 57c7bc1bb..fd18c146d 100644
> --- a/testcases/lib/tst_checkpoint.c
> +++ b/testcases/lib/tst_checkpoint.c
> @@ -20,6 +20,7 @@
> #include <limits.h>
> #include <stdio.h>
> #include <stdlib.h>
> +#include <string.h>
> #define TST_NO_DEFAULT_MAIN
> #include "tst_test.h"
>
> diff --git a/testcases/lib/tst_device.c b/testcases/lib/tst_device.c
> index 1cfdc962c..73d2e7dcb 100644
> --- a/testcases/lib/tst_device.c
> +++ b/testcases/lib/tst_device.c
> @@ -20,6 +20,7 @@
> #include <limits.h>
> #include <stdio.h>
> #include <stdlib.h>
> +#include <string.h>
> #define TST_NO_DEFAULT_MAIN
> #include "tst_test.h"
> #include "old/old_device.h"
> diff --git a/testcases/lib/tst_kvcmp.c b/testcases/lib/tst_kvcmp.c
> index 06632a278..0405d9d9e 100644
> --- a/testcases/lib/tst_kvcmp.c
> +++ b/testcases/lib/tst_kvcmp.c
> @@ -19,6 +19,7 @@
> #define TST_NO_DEFAULT_MAIN
> #include <stdio.h>
> #include <stdlib.h>
> +#include <string.h>
> #include <sys/utsname.h>
> #include <tst_test.h>
>
> diff --git a/testcases/network/sctp/sctp_big_chunk.c b/testcases/network/sctp/sctp_big_chunk.c
> index 4ebdcb20f..32c350af2 100644
> --- a/testcases/network/sctp/sctp_big_chunk.c
> +++ b/testcases/network/sctp/sctp_big_chunk.c
> @@ -14,6 +14,7 @@
> #include <netinet/ip.h>
> #include <netinet/ip6.h>
> #include <netdb.h>
> +#include <string.h>
> #include <sys/syscall.h>
>
> #include "tst_test.h"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linux.it/pipermail/ltp/attachments/20190412/511c8ca0/attachment-0001.html>
^ permalink raw reply [flat|nested] 16+ messages in thread
* [LTP] [RFC PATCH 2/3] Add more missing <string.h> and <strings.h> includes
2019-04-12 8:49 ` Cyril Hrubis
@ 2019-04-12 8:48 ` Petr Vorel
2019-04-12 9:05 ` =?unknown-8bit?b?6Ziu5q2j5pe6?=
0 siblings, 1 reply; 16+ messages in thread
From: Petr Vorel @ 2019-04-12 8:48 UTC (permalink / raw)
To: ltp
Hi,
> > > diff --git a/include/tst_numa.h b/include/tst_numa.h
> > > index a4cd1be37..4f9806602 100644
> > > --- a/include/tst_numa.h
> > > +++ b/include/tst_numa.h
> > > @@ -7,6 +7,8 @@
> > > #ifndef TST_NUMA_H__
> > > #define TST_NUMA_H__
> > > +#include <string.h>
> > > +
> > > /**
> > > * Numa nodemap.
> > > */
> > > diff --git a/lib/tst_af_alg.c b/lib/tst_af_alg.c
> > > index 97be548b4..edf8c0140 100644
> > > --- a/lib/tst_af_alg.c
> > > +++ b/lib/tst_af_alg.c
> > > @@ -5,6 +5,7 @@
> > > #include <errno.h>
> > > #include <stdlib.h>
> > > +#include <string.h>
> > Why not simply include <string.h>?? in tst_test.h. I did it in my another
> > review thread. This should be OK for most of cases.
> Sounds reasonable to me.
Agree, that'd be the easiest way :). NOTE: not sure what requires that, but
sometimes is <strings.h> needed as well.
Kind regards,
Petr
^ permalink raw reply [flat|nested] 16+ messages in thread
* [LTP] [RFC PATCH 2/3] Add more missing <string.h> and <strings.h> includes
2019-04-12 2:12 ` =?unknown-8bit?b?6Ziu5q2j5pe6?=
@ 2019-04-12 8:49 ` Cyril Hrubis
2019-04-12 8:48 ` Petr Vorel
0 siblings, 1 reply; 16+ messages in thread
From: Cyril Hrubis @ 2019-04-12 8:49 UTC (permalink / raw)
To: ltp
Hi!
> > diff --git a/include/tst_numa.h b/include/tst_numa.h
> > index a4cd1be37..4f9806602 100644
> > --- a/include/tst_numa.h
> > +++ b/include/tst_numa.h
> > @@ -7,6 +7,8 @@
> > #ifndef TST_NUMA_H__
> > #define TST_NUMA_H__
> >
> > +#include <string.h>
> > +
> > /**
> > * Numa nodemap.
> > */
> > diff --git a/lib/tst_af_alg.c b/lib/tst_af_alg.c
> > index 97be548b4..edf8c0140 100644
> > --- a/lib/tst_af_alg.c
> > +++ b/lib/tst_af_alg.c
> > @@ -5,6 +5,7 @@
> >
> > #include <errno.h>
> > #include <stdlib.h>
> > +#include <string.h>
>
> Why not simply include <string.h>?? in tst_test.h. I did it in my another
> review thread. This should be OK for most of cases.
Sounds reasonable to me.
--
Cyril Hrubis
chrubis@suse.cz
^ permalink raw reply [flat|nested] 16+ messages in thread
* [LTP] [RFC PATCH 2/3] Add more missing <string.h> and <strings.h> includes
2019-04-12 8:48 ` Petr Vorel
@ 2019-04-12 9:05 ` =?unknown-8bit?b?6Ziu5q2j5pe6?=
2019-04-12 9:45 ` Cyril Hrubis
2019-04-12 16:48 ` Enji Cooper
0 siblings, 2 replies; 16+ messages in thread
From: =?unknown-8bit?b?6Ziu5q2j5pe6?= @ 2019-04-12 9:05 UTC (permalink / raw)
To: ltp
Hi Petr,
-------- Original Message --------
From: Petr Vorel
Sent: Fri, 12 Apr 2019 10:48:53 +0200
To: Cyril Hrubis
Cc: ?????????, Ltp, Petr Vorel, Sandeep Patil, Steve Muckle
Subject: Re: [RFC PATCH 2/3] Add more missing <string.h> and <strings.h>
includes
> Hi,
>
>>>> diff --git a/include/tst_numa.h b/include/tst_numa.h
>>>> index a4cd1be37..4f9806602 100644
>>>> --- a/include/tst_numa.h
>>>> +++ b/include/tst_numa.h
>>>> @@ -7,6 +7,8 @@
>>>> #ifndef TST_NUMA_H__
>>>> #define TST_NUMA_H__
>>>> +#include <string.h>
>>>> +
>>>> /**
>>>> * Numa nodemap.
>>>> */
>>>> diff --git a/lib/tst_af_alg.c b/lib/tst_af_alg.c
>>>> index 97be548b4..edf8c0140 100644
>>>> --- a/lib/tst_af_alg.c
>>>> +++ b/lib/tst_af_alg.c
>>>> @@ -5,6 +5,7 @@
>>>> #include <errno.h>
>>>> #include <stdlib.h>
>>>> +#include <string.h>
>>> Why not simply include <string.h>?? in tst_test.h. I did it in my another
>>> review thread. This should be OK for most of cases.
>> Sounds reasonable to me.
> Agree, that'd be the easiest way :). NOTE: not sure what requires that, but
> sometimes is <strings.h> needed as well.
As I know, calls likes str*, mem*, such as, strncpy, memset, requires
<string.h>, but bzero requires <strings.h>. Fortunately <strings.h> are
not used as often as <string.h>. See my another review thread. :-)
Regards,
Zhengwang
>
>
> Kind regards,
> Petr
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linux.it/pipermail/ltp/attachments/20190412/862efbad/attachment.html>
^ permalink raw reply [flat|nested] 16+ messages in thread
* [LTP] [RFC PATCH 2/3] Add more missing <string.h> and <strings.h> includes
2019-04-12 9:05 ` =?unknown-8bit?b?6Ziu5q2j5pe6?=
@ 2019-04-12 9:45 ` Cyril Hrubis
2019-04-12 9:46 ` Petr Vorel
2019-04-12 16:48 ` Enji Cooper
1 sibling, 1 reply; 16+ messages in thread
From: Cyril Hrubis @ 2019-04-12 9:45 UTC (permalink / raw)
To: ltp
Hi!
> >>>> diff --git a/include/tst_numa.h b/include/tst_numa.h
> >>>> index a4cd1be37..4f9806602 100644
> >>>> --- a/include/tst_numa.h
> >>>> +++ b/include/tst_numa.h
> >>>> @@ -7,6 +7,8 @@
> >>>> #ifndef TST_NUMA_H__
> >>>> #define TST_NUMA_H__
> >>>> +#include <string.h>
> >>>> +
> >>>> /**
> >>>> * Numa nodemap.
> >>>> */
> >>>> diff --git a/lib/tst_af_alg.c b/lib/tst_af_alg.c
> >>>> index 97be548b4..edf8c0140 100644
> >>>> --- a/lib/tst_af_alg.c
> >>>> +++ b/lib/tst_af_alg.c
> >>>> @@ -5,6 +5,7 @@
> >>>> #include <errno.h>
> >>>> #include <stdlib.h>
> >>>> +#include <string.h>
> >>> Why not simply include <string.h>?? in tst_test.h. I did it in my another
> >>> review thread. This should be OK for most of cases.
> >> Sounds reasonable to me.
> > Agree, that'd be the easiest way :). NOTE: not sure what requires that, but
> > sometimes is <strings.h> needed as well.
>
> As I know, calls likes str*, mem*, such as, strncpy, memset, requires
> <string.h>,?? but bzero requires <strings.h>. Fortunately <strings.h> are
> not used as often as <string.h>. See my another review thread. :-)
bzero() has been deprecated for quite some time, ideally we should
replace it with memset().
--
Cyril Hrubis
chrubis@suse.cz
^ permalink raw reply [flat|nested] 16+ messages in thread
* [LTP] [RFC PATCH 2/3] Add more missing <string.h> and <strings.h> includes
2019-04-12 9:45 ` Cyril Hrubis
@ 2019-04-12 9:46 ` Petr Vorel
0 siblings, 0 replies; 16+ messages in thread
From: Petr Vorel @ 2019-04-12 9:46 UTC (permalink / raw)
To: ltp
Hi Cyril, Zhengwang,
> > > Agree, that'd be the easiest way :). NOTE: not sure what requires that, but
> > > sometimes is <strings.h> needed as well.
> > As I know, calls likes str*, mem*, such as, strncpy, memset, requires
> > <string.h>,?? but bzero requires <strings.h>. Fortunately <strings.h> are
> > not used as often as <string.h>. See my another review thread. :-)
> bzero() has been deprecated for quite some time, ideally we should
> replace it with memset().
That explains, why <strings.h> is not much used nowadays.
Kind regards,
Petr
^ permalink raw reply [flat|nested] 16+ messages in thread
* [LTP] [RFC PATCH 2/3] Add more missing <string.h> and <strings.h> includes
2019-04-12 9:05 ` =?unknown-8bit?b?6Ziu5q2j5pe6?=
2019-04-12 9:45 ` Cyril Hrubis
@ 2019-04-12 16:48 ` Enji Cooper
1 sibling, 0 replies; 16+ messages in thread
From: Enji Cooper @ 2019-04-12 16:48 UTC (permalink / raw)
To: ltp
> On Apr 12, 2019, at 2:05 AM, 阮正旺 <ruanzw@xiaopeng.com> wrote:
>
> Hi Petr,
>
>
> -------- Original Message --------
> From: Petr Vorel
> Sent: Fri, 12 Apr 2019 10:48:53 +0200
> To: Cyril Hrubis
> Cc: ?????????, Ltp, Petr Vorel, Sandeep Patil, Steve Muckle
> Subject: Re: [RFC PATCH 2/3] Add more missing <string.h> and <strings.h> includes
>> Hi,
>>
>>>>> diff --git a/include/tst_numa.h b/include/tst_numa.h
>>>>> index a4cd1be37..4f9806602 100644
>>>>> --- a/include/tst_numa.h
>>>>> +++ b/include/tst_numa.h
>>>>> @@ -7,6 +7,8 @@
>>>>> #ifndef TST_NUMA_H__
>>>>> #define TST_NUMA_H__
>>>>> +#include <string.h>
>>>>> +
>>>>> /**
>>>>> * Numa nodemap.
>>>>> */
>>>>> diff --git a/lib/tst_af_alg.c b/lib/tst_af_alg.c
>>>>> index 97be548b4..edf8c0140 100644
>>>>> --- a/lib/tst_af_alg.c
>>>>> +++ b/lib/tst_af_alg.c
>>>>> @@ -5,6 +5,7 @@
>>>>> #include <errno.h>
>>>>> #include <stdlib.h>
>>>>> +#include <string.h>
>>>> Why not simply include <string.h>?? in tst_test.h. I did it in my another
>>>> review thread. This should be OK for most of cases.
>>> Sounds reasonable to me.
>> Agree, that'd be the easiest way :). NOTE: not sure what requires that, but
>> sometimes is <strings.h> needed as well.
> As I know, calls likes str*, mem*, such as, strncpy, memset, requires <string.h>, but bzero requires <strings.h>. Fortunately <strings.h> are not used as often as <string.h>. See my another review thread. :-)
>
(Looking at the header on FreeBSD) In addition to bzero, there are other deprecated functions like bcmp, bcopy, but also lesser used functions like strcasecmp and strncasecmp which are defined in strings.h .
Cheers,
-Enji
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linux.it/pipermail/ltp/attachments/20190412/d32f4998/attachment.html>
^ permalink raw reply [flat|nested] 16+ messages in thread
* [LTP] [RFC PATCH 1/3] cve/cve-2014-0196: Don't use libutil for Android
2019-04-11 23:31 ` [LTP] [RFC PATCH 1/3] cve/cve-2014-0196: Don't use libutil for Android Petr Vorel
@ 2019-04-12 19:39 ` Sandeep Patil
2019-04-14 9:59 ` Petr Vorel
0 siblings, 1 reply; 16+ messages in thread
From: Sandeep Patil @ 2019-04-12 19:39 UTC (permalink / raw)
To: ltp
On Fri, Apr 12, 2019 at 01:31:13AM +0200, Petr Vorel wrote:
> From: Petr Vorel <petr.vorel@gmail.com>
>
> as it's not available for it.
>
> Signed-off-by: Petr Vorel <petr.vorel@gmail.com>
> Signed-off-by: Petr Vorel <pvorel@suse.cz>
We've needed this for a while now and I always end up removing
the libutil reference in the auto-generated gen.bp file. Thanks for
fixing this Petr.
Acked-by: Sandeep Patil <sspatil@android.com>
^ permalink raw reply [flat|nested] 16+ messages in thread
* [LTP] [RFC PATCH 1/3] cve/cve-2014-0196: Don't use libutil for Android
2019-04-12 19:39 ` Sandeep Patil
@ 2019-04-14 9:59 ` Petr Vorel
0 siblings, 0 replies; 16+ messages in thread
From: Petr Vorel @ 2019-04-14 9:59 UTC (permalink / raw)
To: ltp
Hi Sandeep,
> On Fri, Apr 12, 2019 at 01:31:13AM +0200, Petr Vorel wrote:
> > From: Petr Vorel <petr.vorel@gmail.com>
> > as it's not available for it.
> > Signed-off-by: Petr Vorel <petr.vorel@gmail.com>
> > Signed-off-by: Petr Vorel <pvorel@suse.cz>
> We've needed this for a while now and I always end up removing
> the libutil reference in the auto-generated gen.bp file. Thanks for
> fixing this Petr.
> Acked-by: Sandeep Patil <sspatil@android.com>
Thanks for your review, pushed this one.
Kind regards,
Petr
^ permalink raw reply [flat|nested] 16+ messages in thread
* [LTP] [RFC PATCH 3/3] make: Add -Werror-implicit-function-declaration for all targets
2019-04-11 23:31 ` [LTP] [RFC PATCH 3/3] make: Add -Werror-implicit-function-declaration for all targets Petr Vorel
@ 2019-07-12 13:48 ` Petr Vorel
2019-08-02 13:03 ` Cyril Hrubis
0 siblings, 1 reply; 16+ messages in thread
From: Petr Vorel @ 2019-07-12 13:48 UTC (permalink / raw)
To: ltp
Hi,
> Previously it was passed only to Android build, but it's good to check
> it for all.
> Signed-off-by: Petr Vorel <pvorel@suse.cz>
> ---
> Tested in travis:
> https://travis-ci.org/pevik/ltp/builds/518886113
> ---
> include/mk/env_post.mk | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
> diff --git a/include/mk/env_post.mk b/include/mk/env_post.mk
> index 913bdf5d1..3ffdd0b7f 100644
> --- a/include/mk/env_post.mk
> +++ b/include/mk/env_post.mk
> @@ -41,11 +41,9 @@ ifeq ($(UCLINUX),1)
> CPPFLAGS += -D__UCLIBC__ -DUCLINUX
> endif
> -ifeq ($(ANDROID),1)
> -# There are many undeclared functions, it's best not to accidentally overlook
> -# them.
> CFLAGS += -Werror-implicit-function-declaration
> +ifeq ($(ANDROID),1)
> LDFLAGS += -L$(top_builddir)/lib/android_libpthread
> LDFLAGS += -L$(top_builddir)/lib/android_librt
> endif
Ping, please. Drop it or merge?
Kind regards,
Petr
^ permalink raw reply [flat|nested] 16+ messages in thread
* [LTP] [RFC PATCH 3/3] make: Add -Werror-implicit-function-declaration for all targets
2019-07-12 13:48 ` Petr Vorel
@ 2019-08-02 13:03 ` Cyril Hrubis
2019-08-02 13:27 ` Petr Vorel
0 siblings, 1 reply; 16+ messages in thread
From: Cyril Hrubis @ 2019-08-02 13:03 UTC (permalink / raw)
To: ltp
Hi!
> > diff --git a/include/mk/env_post.mk b/include/mk/env_post.mk
> > index 913bdf5d1..3ffdd0b7f 100644
> > --- a/include/mk/env_post.mk
> > +++ b/include/mk/env_post.mk
> > @@ -41,11 +41,9 @@ ifeq ($(UCLINUX),1)
> > CPPFLAGS += -D__UCLIBC__ -DUCLINUX
> > endif
>
> > -ifeq ($(ANDROID),1)
> > -# There are many undeclared functions, it's best not to accidentally overlook
> > -# them.
> > CFLAGS += -Werror-implicit-function-declaration
>
> > +ifeq ($(ANDROID),1)
> > LDFLAGS += -L$(top_builddir)/lib/android_libpthread
> > LDFLAGS += -L$(top_builddir)/lib/android_librt
> > endif
>
> Ping, please. Drop it or merge?
My opinion on Werror flags is that they should be on for development but
disabled for releases and production. The question is how to implement
something like this.
On the other hand we do have a CI so most problems would be caught
there...
--
Cyril Hrubis
chrubis@suse.cz
^ permalink raw reply [flat|nested] 16+ messages in thread
* [LTP] [RFC PATCH 3/3] make: Add -Werror-implicit-function-declaration for all targets
2019-08-02 13:03 ` Cyril Hrubis
@ 2019-08-02 13:27 ` Petr Vorel
0 siblings, 0 replies; 16+ messages in thread
From: Petr Vorel @ 2019-08-02 13:27 UTC (permalink / raw)
To: ltp
Hi Cyril,
> Hi!
> > > diff --git a/include/mk/env_post.mk b/include/mk/env_post.mk
> > > index 913bdf5d1..3ffdd0b7f 100644
> > > --- a/include/mk/env_post.mk
> > > +++ b/include/mk/env_post.mk
> > > @@ -41,11 +41,9 @@ ifeq ($(UCLINUX),1)
> > > CPPFLAGS += -D__UCLIBC__ -DUCLINUX
> > > endif
> > > -ifeq ($(ANDROID),1)
> > > -# There are many undeclared functions, it's best not to accidentally overlook
> > > -# them.
> > > CFLAGS += -Werror-implicit-function-declaration
> > > +ifeq ($(ANDROID),1)
> > > LDFLAGS += -L$(top_builddir)/lib/android_libpthread
> > > LDFLAGS += -L$(top_builddir)/lib/android_librt
> > > endif
> > Ping, please. Drop it or merge?
> My opinion on Werror flags is that they should be on for development but
> disabled for releases and production. The question is how to implement
> something like this.
> On the other hand we do have a CI so most problems would be caught
> there...
Good point. I'll post a new patch remove it here and add it for travis.
It will be therefore disabled for Android, hope it's ok.
Kind regards,
Petr
^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2019-08-02 13:27 UTC | newest]
Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-04-11 23:31 [LTP] [PATCH 0/3][RFC] Android fixes and -Werror-implicit-function-declaration as default Petr Vorel
2019-04-11 23:31 ` [LTP] [RFC PATCH 1/3] cve/cve-2014-0196: Don't use libutil for Android Petr Vorel
2019-04-12 19:39 ` Sandeep Patil
2019-04-14 9:59 ` Petr Vorel
2019-04-11 23:31 ` [LTP] [RFC PATCH 2/3] Add more missing <string.h> and <strings.h> includes Petr Vorel
2019-04-12 2:12 ` =?unknown-8bit?b?6Ziu5q2j5pe6?=
2019-04-12 8:49 ` Cyril Hrubis
2019-04-12 8:48 ` Petr Vorel
2019-04-12 9:05 ` =?unknown-8bit?b?6Ziu5q2j5pe6?=
2019-04-12 9:45 ` Cyril Hrubis
2019-04-12 9:46 ` Petr Vorel
2019-04-12 16:48 ` Enji Cooper
2019-04-11 23:31 ` [LTP] [RFC PATCH 3/3] make: Add -Werror-implicit-function-declaration for all targets Petr Vorel
2019-07-12 13:48 ` Petr Vorel
2019-08-02 13:03 ` Cyril Hrubis
2019-08-02 13:27 ` Petr Vorel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox