cboxdoerfer / ddb_spectrogram

Spectrogram plugin for DeaDBeeF audio player
32 stars 8 forks source link

Fail to build with GCC 14 #11

Open marillat opened 1 week ago

marillat commented 1 week ago

Debian amd64 GCC 14.2.0

fastftoi.h:121: warning: ignoring '#pragma warning ' [-Wunknown-pragmas]
  121 | #pragma warning "using sse2 for ftoi"
spectrogram.c: In function 'spectrogram_draw':
spectrogram.c:666:43: warning: comparison between 'ddb_playback_state_t' {aka 'enum ddb_playback_state_e'} and 'enum output_state_t' [-Wenum-compare]
  666 |     if (deadbeef->get_output ()->state () == OUTPUT_STATE_PLAYING) {
      |                                           ^~
spectrogram.c:699:43: warning: comparison between 'ddb_playback_state_t' {aka 'enum ddb_playback_state_e'} and 'enum output_state_t' [-Wenum-compare]
  699 |     if (deadbeef->get_output ()->state () == OUTPUT_STATE_PLAYING) {
      |                                           ^~
spectrogram.c: In function 'spectrogram_expose_event':
spectrogram.c:775:5: warning: 'gdk_cairo_create' is deprecated: Use 'gdk_window_begin_draw_frame() and gdk_drawing_context_get_cairo_context()' instead [-Wdeprecated-declarations]
  775 |     cairo_t *cr = gdk_cairo_create (gtk_widget_get_window (widget));
      |     ^~~~~~~
In file included from /usr/include/gtk-3.0/gdk/gdk.h:33,
                 from /usr/include/gtk-3.0/gtk/gtk.h:30,
                 from spectrogram.c:28:
/usr/include/gtk-3.0/gdk/gdkcairo.h:35:12: note: declared here
   35 | cairo_t  * gdk_cairo_create             (GdkWindow          *window);
      |            ^~~~~~~~~~~~~~~~
spectrogram.c: In function 'spectrogram_button_release_event':
spectrogram.c:797:7: warning: 'gtk_menu_popup' is deprecated: Use '(gtk_menu_popup_at_widget, gtk_menu_popup_at_pointer, gtk_menu_popup_at_rect)' instead [-Wdeprecated-declarations]
  797 |       gtk_menu_popup (GTK_MENU (w->popup), NULL, NULL, NULL, w->drawarea, 0, gtk_get_current_event_time ());
      |       ^~~~~~~~~~~~~~
In file included from /usr/include/gtk-3.0/gtk/gtklabel.h:34,
                 from /usr/include/gtk-3.0/gtk/gtkaccellabel.h:35,
                 from /usr/include/gtk-3.0/gtk/gtk.h:33:
/usr/include/gtk-3.0/gtk/gtkmenu.h:138:12: note: declared here
  138 | void       gtk_menu_popup                 (GtkMenu             *menu,
      |            ^~~~~~~~~~~~~~
spectrogram.c: In function 'spectrogram_message':
spectrogram.c:832:51: warning: comparison between 'ddb_playback_state_t' {aka 'enum ddb_playback_state_e'} and 'enum output_state_t' [-Wenum-compare]
  832 |             if (deadbeef->get_output ()->state () == OUTPUT_STATE_PLAYING) {
      |                                                   ^~
spectrogram.c: In function 'w_spectrogram_create':
spectrogram.c:916:39: error: passing argument 2 of 'deadbeef->vis_waveform_listen' from incompatible pointer type [-Wincompatible-pointer-types]
  916 |     deadbeef->vis_waveform_listen (w, spectrogram_wavedata_listener);
      |                                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                       |
      |                                       void (*)(void *, ddb_audio_data_t *) {aka void (*)(void *, struct ddb_audio_data_s *)}
spectrogram.c:916:39: note: expected 'void (*)(void *, const ddb_audio_data_t *)' {aka 'void (*)(void *, const struct ddb_audio_data_s *)'} but argument is of type 'void (*)(void *, ddb_audio_data_t *)' {aka 'void (*)(void *, struct ddb_audio_data_s *)'}
make[2]: *** [Makefile:82: gtk3/spectrogram.o] Error 1
marillat commented 1 week ago

Fixed in PR https://github.com/cboxdoerfer/ddb_spectrogram/pull/12