Fix C type errors using G_CALLBACK
Related to: <https://fedoraproject.org/wiki/Changes/PortingToModernC> <https://fedoraproject.org/wiki/Toolchain/PortingToModernC>
This commit is contained in:
parent
0abdf21640
commit
4e028d85fc
132
alsa-tools-c99.patch
Normal file
132
alsa-tools-c99.patch
Normal file
@ -0,0 +1,132 @@
|
||||
Submitted upstream: <https://github.com/alsa-project/alsa-tools/pull/17>
|
||||
|
||||
diff --git a/echomixer/echomixer.c b/echomixer/echomixer.c
|
||||
index 4946a5ddd5de6790..80124baefa6608f3 100644
|
||||
--- a/echomixer/echomixer.c
|
||||
+++ b/echomixer/echomixer.c
|
||||
@@ -2105,7 +2105,7 @@ printf("components = %s\n", snd_ctl_card_info_get_components(hw_info));*/
|
||||
for (i=0; i<ndmodes; i++) {
|
||||
menuitem=gtk_menu_item_new_with_label(dmodeName[i]);
|
||||
gtk_widget_show(menuitem);
|
||||
- gtk_signal_connect(GTK_OBJECT(menuitem), "activate", Digital_mode_activate, (gpointer)(long)i);
|
||||
+ gtk_signal_connect(GTK_OBJECT(menuitem), "activate", G_CALLBACK(Digital_mode_activate), (gpointer)(long)i);
|
||||
gtk_menu_append(GTK_MENU(menu), menuitem);
|
||||
}
|
||||
gtk_option_menu_set_menu(GTK_OPTION_MENU(dmodeOpt), menu);
|
||||
@@ -2131,7 +2131,7 @@ printf("components = %s\n", snd_ctl_card_info_get_components(hw_info));*/
|
||||
clocksrc_menuitem[i]=gtk_menu_item_new_with_label(clocksrcName[i]);
|
||||
gtk_widget_show(clocksrc_menuitem[i]);
|
||||
gtk_widget_set_sensitive(clocksrc_menuitem[i], FALSE);
|
||||
- gtk_signal_connect(GTK_OBJECT(clocksrc_menuitem[i]), "activate", Clock_source_activate, (gpointer)(long)i);
|
||||
+ gtk_signal_connect(GTK_OBJECT(clocksrc_menuitem[i]), "activate", G_CALLBACK(Clock_source_activate), (gpointer)(long)i);
|
||||
gtk_menu_append(GTK_MENU(menu), clocksrc_menuitem[i]);
|
||||
}
|
||||
gtk_option_menu_set_menu(GTK_OPTION_MENU(clocksrcOpt), menu);
|
||||
@@ -2157,7 +2157,7 @@ printf("components = %s\n", snd_ctl_card_info_get_components(hw_info));*/
|
||||
for (i=0; i<nspdifmodes; i++) {
|
||||
menuitem=gtk_menu_item_new_with_label(spdifmodeName[i]);
|
||||
gtk_widget_show(menuitem);
|
||||
- gtk_signal_connect(GTK_OBJECT(menuitem), "activate", SPDIF_mode_activate, (gpointer)(long)i);
|
||||
+ gtk_signal_connect(GTK_OBJECT(menuitem), "activate", G_CALLBACK(SPDIF_mode_activate), (gpointer)(long)i);
|
||||
gtk_menu_append(GTK_MENU(menu), menuitem);
|
||||
}
|
||||
gtk_option_menu_set_menu(GTK_OPTION_MENU(spdifmodeOpt), menu);
|
||||
@@ -2182,7 +2182,7 @@ printf("components = %s\n", snd_ctl_card_info_get_components(hw_info));*/
|
||||
gtk_box_pack_start(GTK_BOX(hbox), button, TRUE, FALSE, 0);
|
||||
ReadControl(&i, 1, PhantomPower.id, SND_CTL_ELEM_IFACE_MIXER);
|
||||
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button), i);
|
||||
- gtk_signal_connect(GTK_OBJECT(button), "toggled", Switch_toggled, (gpointer)&PhantomPower);
|
||||
+ gtk_signal_connect(GTK_OBJECT(button), "toggled", G_CALLBACK(Switch_toggled), (gpointer)&PhantomPower);
|
||||
PhantomPower.Button=button;
|
||||
}
|
||||
|
||||
@@ -2193,7 +2193,7 @@ printf("components = %s\n", snd_ctl_card_info_get_components(hw_info));*/
|
||||
gtk_box_pack_start(GTK_BOX(hbox), button, TRUE, FALSE, 0);
|
||||
ReadControl(&i, 1, Automute.id, SND_CTL_ELEM_IFACE_CARD);
|
||||
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button), i);
|
||||
- gtk_signal_connect(GTK_OBJECT(button), "toggled", Switch_toggled, (gpointer)&Automute);
|
||||
+ gtk_signal_connect(GTK_OBJECT(button), "toggled", G_CALLBACK(Switch_toggled), (gpointer)&Automute);
|
||||
Automute.Button=button;
|
||||
}
|
||||
|
||||
@@ -2202,7 +2202,7 @@ printf("components = %s\n", snd_ctl_card_info_get_components(hw_info));*/
|
||||
autoclockChkbutton=gtk_check_button_new_with_label("Autoclock");
|
||||
gtk_widget_show(autoclockChkbutton);
|
||||
gtk_box_pack_start(GTK_BOX(hbox), autoclockChkbutton, TRUE, FALSE, 0);
|
||||
- gtk_signal_connect(GTK_OBJECT(autoclockChkbutton), "toggled", AutoClock_toggled, NULL);
|
||||
+ gtk_signal_connect(GTK_OBJECT(autoclockChkbutton), "toggled", G_CALLBACK(AutoClock_toggled), NULL);
|
||||
AutoClock=-1;
|
||||
}
|
||||
}
|
||||
@@ -2672,7 +2672,7 @@ printf("components = %s\n", snd_ctl_card_info_get_components(hw_info));*/
|
||||
gtk_box_pack_start(GTK_BOX(hbox), button, TRUE, TRUE, 0);
|
||||
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button), 1);
|
||||
gtk_widget_show(button);
|
||||
- gtk_signal_connect(GTK_OBJECT(button), "toggled", Gang_button_toggled, 0);
|
||||
+ gtk_signal_connect(GTK_OBJECT(button), "toggled", G_CALLBACK(Gang_button_toggled), 0);
|
||||
|
||||
// Controls frame
|
||||
frame=gtk_frame_new("Controls");
|
||||
@@ -2687,7 +2687,7 @@ printf("components = %s\n", snd_ctl_card_info_get_components(hw_info));*/
|
||||
button=gtk_toggle_button_new_with_label("VU");
|
||||
gtk_widget_show(button);
|
||||
gtk_box_pack_start(GTK_BOX(hbox), button, TRUE, TRUE, 1);
|
||||
- gtk_signal_connect(GTK_OBJECT(button), "toggled", VUmeters_button_click, 0);
|
||||
+ gtk_signal_connect(GTK_OBJECT(button), "toggled", G_CALLBACK(VUmeters_button_click), 0);
|
||||
VUw_geom.toggler=button;
|
||||
if (VUw_geom.st==1)
|
||||
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button), TRUE);
|
||||
@@ -2697,7 +2697,7 @@ printf("components = %s\n", snd_ctl_card_info_get_components(hw_info));*/
|
||||
button=gtk_toggle_button_new_with_label("Line");
|
||||
gtk_widget_show(button);
|
||||
gtk_box_pack_start(GTK_BOX(hbox), button, TRUE, TRUE, 1);
|
||||
- gtk_signal_connect(GTK_OBJECT(button), "toggled", ToggleWindow, (gpointer)LVwindow);
|
||||
+ gtk_signal_connect(GTK_OBJECT(button), "toggled", G_CALLBACK(ToggleWindow), (gpointer)LVwindow);
|
||||
LVw_geom.toggler=button;
|
||||
if (LVw_geom.st==1)
|
||||
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button), TRUE);
|
||||
@@ -2707,7 +2707,7 @@ printf("components = %s\n", snd_ctl_card_info_get_components(hw_info));*/
|
||||
button=gtk_toggle_button_new_with_label("Misc");
|
||||
gtk_widget_show(button);
|
||||
gtk_box_pack_start(GTK_BOX(hbox), button, TRUE, TRUE, 1);
|
||||
- gtk_signal_connect(GTK_OBJECT(button), "toggled", ToggleWindow, (gpointer)Miscwindow);
|
||||
+ gtk_signal_connect(GTK_OBJECT(button), "toggled", G_CALLBACK(ToggleWindow), (gpointer)Miscwindow);
|
||||
Miscw_geom.toggler=button;
|
||||
if (Miscw_geom.st==1)
|
||||
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button), TRUE);
|
||||
@@ -2718,7 +2718,7 @@ printf("components = %s\n", snd_ctl_card_info_get_components(hw_info));*/
|
||||
button=gtk_toggle_button_new_with_label("GrMix");
|
||||
gtk_widget_show(button);
|
||||
gtk_box_pack_start(GTK_BOX(hbox), button, TRUE, TRUE, 1);
|
||||
- gtk_signal_connect(GTK_OBJECT(button), "toggled", GMixer_button_click, 0);
|
||||
+ gtk_signal_connect(GTK_OBJECT(button), "toggled", G_CALLBACK(GMixer_button_click), 0);
|
||||
GMw_geom.toggler=button;
|
||||
if (GMw_geom.st==1)
|
||||
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button), TRUE);
|
||||
@@ -2727,7 +2727,7 @@ printf("components = %s\n", snd_ctl_card_info_get_components(hw_info));*/
|
||||
button=gtk_toggle_button_new_with_label("Mixer");
|
||||
gtk_widget_show(button);
|
||||
gtk_box_pack_start(GTK_BOX(hbox), button, TRUE, TRUE, 1);
|
||||
- gtk_signal_connect(GTK_OBJECT(button), "toggled", ToggleWindow, (gpointer)mixerControl.window);
|
||||
+ gtk_signal_connect(GTK_OBJECT(button), "toggled", G_CALLBACK(ToggleWindow), (gpointer)mixerControl.window);
|
||||
Mixerw_geom.toggler=button;
|
||||
if (Mixerw_geom.st==1)
|
||||
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button), TRUE);
|
||||
@@ -2738,7 +2738,7 @@ printf("components = %s\n", snd_ctl_card_info_get_components(hw_info));*/
|
||||
button=gtk_toggle_button_new_with_label("Vmixer");
|
||||
gtk_widget_show(button);
|
||||
gtk_box_pack_start(GTK_BOX(hbox), button, TRUE, TRUE, 1);
|
||||
- gtk_signal_connect(GTK_OBJECT(button), "toggled", ToggleWindow, (gpointer)vmixerControl.window);
|
||||
+ gtk_signal_connect(GTK_OBJECT(button), "toggled", G_CALLBACK(ToggleWindow), (gpointer)vmixerControl.window);
|
||||
Vmixerw_geom.toggler=button;
|
||||
if (Vmixerw_geom.st==1)
|
||||
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button), TRUE);
|
||||
@@ -2749,7 +2749,7 @@ printf("components = %s\n", snd_ctl_card_info_get_components(hw_info));*/
|
||||
button=gtk_toggle_button_new_with_label("PCM");
|
||||
gtk_widget_show(button);
|
||||
gtk_box_pack_start(GTK_BOX(hbox), button, TRUE, TRUE, 1);
|
||||
- gtk_signal_connect(GTK_OBJECT(button), "toggled", ToggleWindow, (gpointer)pcmoutControl.window);
|
||||
+ gtk_signal_connect(GTK_OBJECT(button), "toggled", G_CALLBACK(ToggleWindow), (gpointer)pcmoutControl.window);
|
||||
PVw_geom.toggler=button;
|
||||
if (PVw_geom.st==1)
|
||||
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button), TRUE);
|
@ -25,7 +25,7 @@
|
||||
Summary: Specialist tools for ALSA
|
||||
Name: alsa-tools
|
||||
Version: 1.2.5
|
||||
Release: 9%{?dist}
|
||||
Release: 10%{?dist}
|
||||
|
||||
# Checked at least one source file from all the sub-projects contained in
|
||||
# the source tarball and they are consistent GPLv2+ - TJ 2007-11-15
|
||||
@ -36,6 +36,7 @@ Source: ftp://ftp.alsa-project.org/pub/tools/%{name}-%{version}.tar.bz2
|
||||
Source1: 90-alsa-tools-firmware.rules
|
||||
|
||||
Patch1: hwmixvolume-python.patch
|
||||
Patch2: alsa-tools-c99.patch
|
||||
|
||||
BuildRequires: gcc gcc-c++
|
||||
BuildRequires: alsa-lib-devel >= %{version}
|
||||
@ -93,6 +94,7 @@ The following tools are available:
|
||||
%prep
|
||||
%setup -q -n %{name}-%{version}
|
||||
%patch1 -p1 -b .hwmixvolume-python
|
||||
%patch -P 2 -p1
|
||||
|
||||
%build
|
||||
mv seq/sbiload . ; rm -rf seq
|
||||
@ -201,6 +203,9 @@ install -m 644 %{SOURCE1} %{buildroot}/lib/udev/rules.d
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Tue Jan 09 2024 Florian Weimer <fweimer@redhat.com> - 1.2.5-10
|
||||
- Fix C type errors using G_CALLBACK
|
||||
|
||||
* Wed Jul 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.5-9
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user