Skip to content

clang 16 build failure, incompatible function pointer types #61

@chenrui333

Description

@chenrui333

while regression build valabind, found some incompatible function pointer types with newer clang

  gowriter.vala:865:34: error: incompatible function pointer types passing 'void (gconstpointer, gconstpointer, gpointer)' (aka 'void (const void *, const void *, void *)') to parameter of type 'GHFunc' (aka 'void (*)(void *, void *, void *)') [-Wincompatible-function-pointer-types]
                  g_hash_table_foreach (_tmp13_, ____lambda9__gh_func, _data3_);
                                                 ^~~~~~~~~~~~~~~~~~~~
  /opt/homebrew/Cellar/glib/2.80.4/include/glib-2.0/glib/ghash.h:114:61: note: passing argument to parameter 'func' here
                                              GHFunc          func,
                                                              ^
  1 error generated.
  vlangwriter.vala:778:34: error: incompatible function pointer types passing 'void (gconstpointer, gconstpointer, gpointer)' (aka 'void (const void *, const void *, void *)') to parameter of type 'GHFunc' (aka 'void (*)(void *, void *, void *)') [-Wincompatible-function-pointer-types]
                  g_hash_table_foreach (_tmp13_, ____lambda6__gh_func, _data6_);
                                                 ^~~~~~~~~~~~~~~~~~~~
  /opt/homebrew/Cellar/glib/2.80.4/include/glib-2.0/glib/ghash.h:114:61: note: passing argument to parameter 'func' here
                                              GHFunc          func,
                                                              ^
  1 error generated.

full build log, https://github.com/Homebrew/homebrew-core/actions/runs/10029422228/job/27717614528?pr=177971
relates to Homebrew/homebrew-core#177971

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions