On 03/05/2013 06:20 PM, Lukas Slebodnik wrote:
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
Hi,
nice catch. This is an honest mistake. 'type' parameter of
sudosrv_get_sudorules_query_cache() is unused. You can safely
remove it.