[SSSD] Invalid assignment to enum

Lukas Slebodnik lslebodn at redhat.com
Tue Mar 5 17:20:14 UTC 2013


Hi,
I played with clang and there were 2 interesting warnings:

-------------------
../sssd/src/responder/sudo/sudosrv_get_sudorules.c:373:71: warning: implicit conversion from enumeration type 'enum sss_sudo_type' to different enumeration type 'enum sss_dp_sudo_type' [-Wconversion]
                                            cmd_ctx->domain, cmd_ctx->type,
                                                             ~~~~~~~~~^~~~
../sssd/src/responder/sudo/sudosrv_get_sudorules.c:580:71: warning: implicit conversion from enumeration type 'enum sss_sudo_type' to different enumeration type 'enum sss_dp_sudo_type' [-Wconversion]
                                            cmd_ctx->domain, cmd_ctx->type,
-------------------

Function sudosrv_get_sudorules_query_cache() expects "enum sss_dp_sudo_type"
and type of cmd_ctx->type is "enum sss_sudo_type". 

It is a purpose or mistake?

btw: gcc do not throw this warning with flag -Wconversion

LS






More information about the sssd-devel mailing list