[SSSD] [PATCHES] Include header file in implementation module.

Lukas Slebodnik lslebodn at redhat.com
Tue Sep 24 13:26:21 UTC 2013


On (24/09/13 13:16), Jakub Hrozek wrote:
>On Mon, Sep 23, 2013 at 03:03:27PM +0200, Lukas Slebodnik wrote:
>> ehlo,
>> 
>> I wondered how could it happen that prototype function was different than
>> definition of function "RESPONDER: Use right function prototype".
>> 
>> Reason: we don't have enable warnings Wmissing-declarations.
>> gcc manual pages says:
>>            Warn if a global function is defined without a previous
>>            declaration.  Do so even if the definition itself provides a
>>            prototype.  Use this option to detect global functions that are not
>>            declared in header files.  In C, no warnings are issued for
>>            functions with previous non-prototype declarations; use
>>            -Wmissing-prototype to detect missing prototypes.  In C++, no
>>            warnings are issued for function templates, or for inline
>>            functions, or for functions in anonymous namespaces.
>> 
>> 
>> Attached patches include existing header files into implementation files,
>> but I think we should file a ticket to fix remaining warnings.
>> (Function should be declared as static or declaration should be in header file.
>> 
>> 2nd patch fix warning for following functions
>> 
>> Function                   | Implementation file without included header file
>> ---------------------------------------------------------
>> murmurhash3                 src/util/murmurhash3.c
>> ck_leak_check_setup         src/tests/common_check.c
>> sss_base64_encode           src/util/crypto/nss/nss_base64.c
>> sss_base64_decode           src/util/crypto/nss/nss_base64.c
>> nspr_nss_init               src/util/crypto/nss/nss_util.c
>> nspr_nss_cleanup            src/util/crypto/nss/nss_util.c
>> sss_parse_name_for_domains  src/util/usertools.c
>> sdap_dom_enum_send          src/providers/ldap/sdap_async_enum.c
>> sdap_nested_group_send      src/providers/ldap/sdap_async_nested_groups.c
>> sdap_nested_group_recv      src/providers/ldap/sdap_async_nested_groups.c
>> sdap_dyndns_update_send     src/providers/ldap/sdap_dyndns.c
>> sdap_dyndns_update_recv     src/providers/ldap/sdap_dyndns.c
>> become_user                 src/providers/krb5/krb5_become_user.c
>> switch_creds                src/providers/krb5/krb5_become_user.c
>> krb5_child_init             src/providers/krb5/krb5_init_shared.c
>> get_uid_table               src/util/find_uid.c
>> check_if_uid_is_active      src/util/find_uid.c
>> sdap_pam_access_handler     src/providers/ldap/ldap_access.c
>> pack_user_info_chpass_error src/util/user_info_msg.c
>> ipa_s2n_get_acct_info_send  src/providers/ipa/ipa_s2n_exop.c
>> ipa_srv_plugin_ctx_init     src/providers/ipa/ipa_srv.c
>> ipa_srv_plugin_send         src/providers/ipa/ipa_srv.c
>> ad_srv_plugin_send          src/providers/ad/ad_srv.c
>> ad_master_domain_send       src/providers/ad/ad_domain_info.c
>> sss_dp_get_ssh_host_send    src/responder/ssh/sshsrv_dp.c
>> sss_dp_get_ssh_host_recv    src/responder/ssh/sshsrv_dp.c
>> 
>
>The patches build fine and the additions look OK to me.
>
>ACK

https://fedorahosted.org/sssd/ticket/2098

LS



More information about the sssd-devel mailing list