Hi Bruno, Bruno Haible via Gnulib discussion list <[email protected]> writes:
> In a testdir, I see these gcc warnings: > > ../../gltests/test-stdc_rotate_left.c:30:12: warning: unused variable 'e' > [-Wunused-variable] > ../../gltests/test-stdc_rotate_right.c:30:12: warning: unused variable 'e' > [-Wunused-variable] > > This patch should fix it. > > > 2026-05-01 Bruno Haible <[email protected]> > > stdc_rotate_left tests, stdc_rotate_right tests: Fix gcc warning. > * tests/test-stdc_rotate_left.c (TEST_CASE): Fix "unused variable 'e'" > warning. > * tests/test-stdc_rotate_right.c (TEST_CASE): Likewise. > > diff --git a/tests/test-stdc_rotate_left.c b/tests/test-stdc_rotate_left.c > index ab1a32e662..64cc5b8477 100644 > --- a/tests/test-stdc_rotate_left.c > +++ b/tests/test-stdc_rotate_left.c > @@ -28,8 +28,8 @@ > { \ > type v = value; \ > type e = expect; \ > - ASSERT (function (v, shift) == expect); \ > - ASSERT (stdc_rotate_left (v, shift) == expect); \ > + ASSERT (function (v, shift) == e); \ > + ASSERT (stdc_rotate_left (v, shift) == e); \ > } \ > while (false) I thought it was safer to ensure they were the correct type. It is a bit funny that I didn't even end up using the variables... I know it is only a few lines, but is it okay if I consider these changes to be under LGPLv2+? Adhemerval added stdc_rotate_right to glibc for the import of fts [1]. In that patch, I let him use my use my tests from Gnulib under the LGPLv2+ since no one had modified them and the rest of the stdbit.h tests are in glibc. I had planned to sync them, but evidently forgot to. I can do that this weekend. Collin [1] https://inbox.sourceware.org/libc-alpha/[email protected]/
