The C Source, Patches and (shudder!) Bugs
Post Reply
heitbaum
Posts: 1
Joined: 09 Dec 2024, 14:23

Build fix for gcc-15

Post by heitbaum » 09 Dec 2024, 14:25

Code: Select all

--- a/usb_modeswitch.c  2020-07-10 15:48:03.000000000 +0000
+++ b/usb_modeswitch.c  2024-12-09 12:18:10.953574344 +0000
@@ -570,7 +570,7 @@
        /* Get current configuration of default device, note value if Configuration
         * parameter is set. Also sets active_config
         */
-       currentConfigVal = get_current_config_value(dev);
+       currentConfigVal = get_current_config_value();
        if (Configuration > -1) {
                SHOW_PROGRESS(output,"Current configuration number is %d\n", currentConfigVal);
        } else
@@ -772,7 +772,7 @@
        if (Configuration > 0) {
                if (currentConfigVal != Configuration) {
                        if (switchConfiguration()) {
-                               currentConfigVal = get_current_config_value(dev);
+                               currentConfigVal = get_current_config_value();
                                if (currentConfigVal == Configuration) {
                                        SHOW_PROGRESS(output,"The configuration was set successfully\n");
                                } else {

Josh
Site Admin
Posts: 6592
Joined: 03 Nov 2007, 00:30

Re: Build fix for gcc-15

Post by Josh » 12 Dec 2024, 20:12

Thanks for the hint!

It's actually a bug that was ignored by the compiler up to now.

Post Reply