alsa-project / snd-firewire-ctl-services

A set of server programs for audio and music units on IEEE 1394 bus supported by Linux sound subsystem a.k.a. ALSA.
GNU General Public License v3.0
35 stars 5 forks source link

error[E0308]: mismatched types #183

Closed wachhu closed 7 months ago

wachhu commented 7 months ago

Hi, I've installed all dependencies and E0308 appears when running the cargo build command. How can I fix it?

error[E0308]: mismatched types
   --> /home/sse_021/.cargo/registry/src/index.crates.io-6f17d22bba15001f/hitaki-0.3.0/src/enums.rs:14:72
    |
14  |             ffi::hitaki_alsa_firewire_error_to_label(self.into_glib(), &mut ptr);
    |             ----------------------------------------                   ^^^^^^^^ expected `*mut *const u8`, found `&mut *const i8`
    |             |
    |             arguments to this function are incorrect
    |
    = note:    expected raw pointer `*mut *const u8`
            found mutable reference `&mut *const i8`
note: function defined here
   --> /home/sse_021/.cargo/registry/src/index.crates.io-6f17d22bba15001f/hitaki-sys-0.3.0/src/lib.rs:560:12
    |
560 |     pub fn hitaki_alsa_firewire_error_to_label(
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0308]: mismatched types
  --> /home/sse_021/.cargo/registry/src/index.crates.io-6f17d22bba15001f/hitaki-0.3.0/src/enums.rs:15:38
   |
15 |             std::ffi::CStr::from_ptr(ptr).to_str().unwrap()
   |             ------------------------ ^^^ expected `*const u8`, found `*const i8`
   |             |
   |             arguments to this function are incorrect
   |
   = note: expected raw pointer `*const u8`
              found raw pointer `*const i8`
note: associated function defined here
  --> /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/core/src/ffi/c_str.rs:262:25

error[E0308]: mismatched types
   --> /home/sse_021/.cargo/registry/src/index.crates.io-6f17d22bba15001f/hitaki-0.3.0/src/enums.rs:29:71
    |
29  |             ffi::hitaki_efw_protocol_error_to_label(self.into_glib(), &mut ptr);
    |             ---------------------------------------                   ^^^^^^^^ expected `*mut *const u8`, found `&mut *const i8`
    |             |
    |             arguments to this function are incorrect
    |
    = note:    expected raw pointer `*mut *const u8`
            found mutable reference `&mut *const i8`
note: function defined here
   --> /home/sse_021/.cargo/registry/src/index.crates.io-6f17d22bba15001f/hitaki-sys-0.3.0/src/lib.rs:575:12
    |
575 |     pub fn hitaki_efw_protocol_error_to_label(
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0308]: mismatched types
  --> /home/sse_021/.cargo/registry/src/index.crates.io-6f17d22bba15001f/hitaki-0.3.0/src/enums.rs:30:38
   |
30 |             std::ffi::CStr::from_ptr(ptr).to_str().unwrap()
   |             ------------------------ ^^^ expected `*const u8`, found `*const i8`
   |             |
   |             arguments to this function are incorrect
   |
   = note: expected raw pointer `*const u8`
              found raw pointer `*const i8`
note: associated function defined here
  --> /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/core/src/ffi/c_str.rs:262:25

For more information about this error, try `rustc --explain E0308`.
error: could not compile `hitaki` (lib) due to 4 previous errors
warning: build failed, waiting for other jobs to finish...