[SSSD] [PATCH] util: Fix const cast failures when building with -Werror

Jakub Hrozek jhrozek at redhat.com
Fri Jan 10 13:37:22 UTC 2014


On Fri, Jan 10, 2014 at 02:18:07PM +0100, Lukas Slebodnik wrote:
> On (10/01/14 10:17), Jakub Hrozek wrote:
> >On Fri, Jan 10, 2014 at 08:15:43AM +0100, Stef Walter wrote:
> >> This results when running 'make check' with $SSS_ERROR set:
> >> 
> >> ../src/tests/cmocka/test_authtok.c: In function ‘test_sss_authtok_password’:
> >> ../src/tests/cmocka/test_authtok.c:98:48: error: cast discards
> >> ‘__attribute__((const))’ qualifier from pointer target type
> >> [-Werror=cast-qual]
> >>      ret = sss_authtok_set(ts->authtoken, type, (uint8_t *)data, len);
> >
> >Hm, I wonder why I don't see these warnings despite -Wall -Wextra in my
> >CFLAGS. Anyway, the patch looks good and builds fine.
> >
> there weren't warnings with clang :-) this is a reason why you didn't see any.
> warnings are gone with gcc.

Ah, I haven't used gcc on my devel laptop for quite some time now..thanks
for checking! (Also, bad clang, bad..)



More information about the sssd-devel mailing list