[v2] x86: Fix TEST_NAME to make it a string in tst-strncmp-rtm.c

Message ID 20220218230025.3505625-1-goldstein.w.n@gmail.com
State Committed
Commit b98d0bbf747f39770e0caba7e984ce9f8f900330
Headers
Series [v2] x86: Fix TEST_NAME to make it a string in tst-strncmp-rtm.c |

Checks

Context Check Description
dj/TryBot-apply_patch success Patch applied to master at the time it was sent
dj/TryBot-32bit success Build for i686

Commit Message

Noah Goldstein Feb. 18, 2022, 11 p.m. UTC
  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)
---
 sysdeps/x86/tst-strncmp-rtm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
  

Comments

H.J. Lu Feb. 18, 2022, 11:11 p.m. UTC | #1
On Fri, Feb 18, 2022 at 3:00 PM Noah Goldstein <goldstein.w.n@gmail.com> wrote:
>
> 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)
> ---
>  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 b50c11e8d4..300bc8c281 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 */
>

LGTM.

Reviewed-by: H.J. Lu <hjl.tools@gmail.com>

Thanks.
  

Patch

diff --git a/sysdeps/x86/tst-strncmp-rtm.c b/sysdeps/x86/tst-strncmp-rtm.c
index b50c11e8d4..300bc8c281 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 */