Skip to content

community/openvas-smb: build with -Wno-incompatible-pointer-types

mio requested to merge mio/aports:openvas-smb into master

Temporarily build with -Wno-incompatible-pointer-types to avoid build failure with gcc 14. The package uses a vendored version of samba/zenoss and currently has multiple instances of incompatible type casting, in samba/lib/com/classes/simple.c and samba/auth/kerberos/krb5_init_context.c.

Found on the 3.21 builders (volatile log).

Example of errors:

/home/buildozer/aports/community/openvas-smb/src/openvas-smb-22.5.6/samba/lib/com/classes/simple.c:95:9: error: initialization of 'struct composite_context * (*)(struct IUnknown *, TALLOC_CTX *, struct GUID *)' {aka 'struct composite_context * (*)(struct IUnknown *, void *, struct GUID *)'} from incompatible pointer type 'WERROR (*)(struct IUnknown *, TALLOC_CTX *, struct GUID *, struct IUnknown **)' {aka 'WERROR (*)(struct IUnknown *, void *, struct GUID *, struct IUnknown **)'} [-Wincompatible-pointer-types]
   95 |         simpleclass_IUnknown_QueryInterface,
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/buildozer/aports/community/openvas-smb/src/openvas-smb-22.5.6/samba/lib/com/classes/simple.c:95:9: note: (near initialization for 'simple_classobject_vtable.QueryInterface_send')
/home/buildozer/aports/community/openvas-smb/src/openvas-smb-22.5.6/samba/lib/com/classes/simple.c:96:9: error: initialization of 'struct composite_context * (*)(struct IUnknown *, TALLOC_CTX *)' {aka 'struct composite_context * (*)(struct IUnknown *, void *)'} from incompatible pointer type 'uint32_t (*)(struct IUnknown *, TALLOC_CTX *)' {aka 'unsigned int (*)(struct IUnknown *, void *)'} [-Wincompatible-pointer-types]
   96 |         simpleclass_IUnknown_AddRef,
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/buildozer/aports/community/openvas-smb/src/openvas-smb-22.5.6/samba/lib/com/classes/simple.c:96:9: note: (near initialization for 'simple_classobject_vtable.AddRef_send')
/home/buildozer/aports/community/openvas-smb/src/openvas-smb-22.5.6/samba/lib/com/classes/simple.c:97:9: error: initialization of 'struct composite_context * (*)(struct IUnknown *, TALLOC_CTX *)' {aka 'struct composite_context * (*)(struct IUnknown *, void *)'} from incompatible pointer type 'uint32_t (*)(struct IUnknown *, TALLOC_CTX *)' {aka 'unsigned int (*)(struct IUnknown *, void *)'} [-Wincompatible-pointer-types]
   97 |         simpleclass_IUnknown_Release,
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/builder/builds/openvas-smb/src/openvas-smb-22.5.6/samba/auth/kerberos/krb5_init_context.c: In function 'smb_krb5_init_context':
/home/builder/builds/openvas-smb/src/openvas-smb-22.5.6/samba/auth/kerberos/krb5_init_context.c:444:41: error: passing argument 2 of 'kr
b5_set_send_to_kdc_func' from incompatible pointer type [-Wincompatible-pointer-types]
  444 |                                         smb_krb5_send_and_recv_func,
      |                                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                         |
      |                                         krb5_error_code (*)(struct krb5_context_data *, void *, krb5_krbhst_info *, const krb5_d
ata *, krb5_data *) {aka int (*)(struct krb5_context_data *, void *, krb5_krbhst_info *, const struct heim_base_data *, struct heim_base
_data *)}
In file included from /usr/include/krb5.h:967,
                 from /home/builder/builds/openvas-smb/src/openvas-smb-22.5.6/samba/lib/replace/system/kerberos.h:133,
                 from /home/builder/builds/openvas-smb/src/openvas-smb-22.5.6/samba/auth/kerberos/krb5_init_context.c:32:
/usr/include/krb5-protos.h:7809:9: note: expected 'krb5_send_to_kdc_func' {aka 'int (*)(struct krb5_context_data *, void *, krb5_krbhst_
info *, long int,  const struct heim_base_data *, struct heim_base_data *)'} but argument is of type 'krb5_error_code (*)(struct krb5_co
ntext_data *, void *, krb5_krbhst_info *, const krb5_data *, krb5_data *)' {aka 'int (*)(struct krb5_context_data *, void *, krb5_krbhst
_info *, const struct heim_base_data *, struct heim_base_data *)'}
 7809 |         krb5_send_to_kdc_func /*func*/,
      |         ^~~~~~~~~~~~~~~~~~~~~

Merge request reports

Loading