ErikReider / SwayNotificationCenter

A simple GTK based notification daemon for SwayWM
GNU General Public License v3.0
1.16k stars 59 forks source link

Fails to build with Clang 15 #209

Closed jbeich closed 1 year ago

jbeich commented 1 year ago

Regressed by https://github.com/llvm/llvm-project/commit/7068aa98412a. Other Vala projects (e.g., SwayFloatingSwitcher, SwaySettings) build fine.

$ export CC=clang CXX=clang++
$ meson setup /tmp/swaync_build
$ meson compile -C /tmp/swaync_build
[...]
src/swaync.p/controlCenter/widgets/baseWidget.c:424:11: error: incompatible integer to pointer conversion assigning to 'gpointer' (aka 'void *') from 'gint' (aka 'int') [-Wint-conversion]
                        result = (gint) json_node_get_int (_tmp11_);
                               ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/swaync.p/controlCenter/widgets/baseWidget.c:432:11: error: incompatible integer to pointer conversion assigning to 'gpointer' (aka 'void *') from 'gboolean' (aka 'int') [-Wint-conversion]
                        result = json_node_get_boolean (_tmp12_);
                               ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/swaync.p/notiDaemon/notiDaemon.c:1021:9: error: incompatible pointer to integer conversion assigning to 'guint32' (aka 'unsigned int') from 'gconstpointer' (aka 'const void *') [-Wint-conversion]
                        r_id = _tmp51_;
                             ^ ~~~~~~~
src/swaync.p/configModel/configModel.c:3984:46: error: incompatible integer to pointer conversion passing 'gboolean' (aka 'int') to parameter of type 'gpointer' (aka 'void *') [-Wint-conversion]
                                                g_hash_table_insert (_tmp24_, _tmp26_, json_node_get_boolean (_tmp27_));
                                                                                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/glib-2.0/glib/ghash.h:73:61: note: passing argument to parameter 'value' here
                                            gpointer        value);
                                                            ^
src/swaync.p/configModel/configModel.c:4507:33: error: incompatible integer to pointer conversion passing 'gboolean' (aka 'int') to parameter of type 'gpointer' (aka 'void *') [-Wint-conversion]
                                                g_ptr_array_add (_tmp16_, json_node_get_boolean (_tmp17_));
                                                                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/glib-2.0/glib/garray.h:198:27: note: passing argument to parameter 'data' here
                                           gpointer          data);
                                                             ^
src/swaync.p/configModel/configModel.c:4516:33: error: incompatible integer to pointer conversion passing 'gint64' (aka 'long') to parameter of type 'gpointer' (aka 'void *') [-Wint-conversion]
                                                g_ptr_array_add (_tmp18_, json_node_get_int (_tmp19_));
                                                                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/glib-2.0/glib/garray.h:198:27: note: passing argument to parameter 'data' here
                                           gpointer          data);
                                                             ^

See also downstream build log