summaryrefslogtreecommitdiff
path: root/x86-Fix-TEST_NAME-to-make-it-a-string-in-tst-strncmp.patch
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2024-08-03 06:28:41 +0000
committerCoprDistGit <infra@openeuler.org>2024-08-03 06:28:41 +0000
commitd20db0561a6a36f914fde030512503b114ef9a0c (patch)
treed4e5e3494d95c269a1cee6195f11bf3201bcadbf /x86-Fix-TEST_NAME-to-make-it-a-string-in-tst-strncmp.patch
parent016343d99b1b269d7246ef1e143d4b54914433d4 (diff)
Diffstat (limited to 'x86-Fix-TEST_NAME-to-make-it-a-string-in-tst-strncmp.patch')
-rw-r--r--x86-Fix-TEST_NAME-to-make-it-a-string-in-tst-strncmp.patch37
1 files changed, 37 insertions, 0 deletions
diff --git a/x86-Fix-TEST_NAME-to-make-it-a-string-in-tst-strncmp.patch b/x86-Fix-TEST_NAME-to-make-it-a-string-in-tst-strncmp.patch
new file mode 100644
index 0000000..2b231d1
--- /dev/null
+++ b/x86-Fix-TEST_NAME-to-make-it-a-string-in-tst-strncmp.patch
@@ -0,0 +1,37 @@
+From 15b00d2af0e56dcc8c244a36d6872d301b0c7185 Mon Sep 17 00:00:00 2001
+From: Noah Goldstein <goldstein.w.n@gmail.com>
+Date: Fri, 18 Feb 2022 17:00:25 -0600
+Subject: [PATCH] x86: Fix TEST_NAME to make it a string in tst-strncmp-rtm.c
+
+Previously TEST_NAME was passing a function pointer. This didn't fail
+because of the -Wno-error flag (to allow for overflow sizes passed
+to strncmp/wcsncmp)
+
+Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
+(cherry picked from commit b98d0bbf747f39770e0caba7e984ce9f8f900330)
+---
+ sysdeps/x86/tst-strncmp-rtm.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/sysdeps/x86/tst-strncmp-rtm.c b/sysdeps/x86/tst-strncmp-rtm.c
+index 4e9f094f39..aef9866cf2 100644
+--- a/sysdeps/x86/tst-strncmp-rtm.c
++++ b/sysdeps/x86/tst-strncmp-rtm.c
+@@ -23,12 +23,12 @@
+ # define CHAR wchar_t
+ # define MEMSET wmemset
+ # define STRNCMP wcsncmp
+-# define TEST_NAME wcsncmp
++# define TEST_NAME "wcsncmp"
+ #else /* !WIDE */
+ # define CHAR char
+ # define MEMSET memset
+ # define STRNCMP strncmp
+-# define TEST_NAME strncmp
++# define TEST_NAME "strncmp"
+ #endif /* !WIDE */
+
+
+--
+2.27.0
+