[SSSD] [PATCH] TESTS: Fix authtok test for zero length string.

Jakub Hrozek jhrozek at redhat.com
Fri Jan 24 14:26:49 UTC 2014


On Tue, Jan 21, 2014 at 09:48:51AM +0100, Lukas Slebodnik wrote:
> ehlo,
> 
> I have one error with current master (I compile with -Werror)
> 
> src/tests/cmocka/test_authtok.c:207:48: error: expression which evaluates
> to zero treated as a null pointer constant of type 'const uint8_t *'
>       [-Werror,-Wnon-literal-null-conversion]
>     ret = sss_authtok_set(ts->authtoken, type, '\0', 0);
>                                                ^~~~
> 1 error generated.o
> 
> I had an discussion with Pallavi Jha on IRC yesterday and this test should
> test empty string(zero length string). Test fof NULL is few lines befor this
> test.
> 
> Patch is attached.
> 
> LS

I haven't seen any warning without the patch, but maybe we use different
toolchain?

But the patch is reasonable and works, ACK



More information about the sssd-devel mailing list