diff --git a/shims/cros-libva/src/config.rs b/shims/cros-libva/src/config.rs index 77550620..777b3a30 100644 --- a/shims/cros-libva/src/config.rs +++ b/shims/cros-libva/src/config.rs @@ -74,13 +74,13 @@ impl Config { // Safe because `self` represents a valid VAConfig. We first query how // much space is needed by the C API by passing in NULL in the first // call to `vaQuerySurfaceAttributes`. - let attrs_len: std::os::raw::c_uint = 0; + let mut attrs_len: std::os::raw::c_uint = 0; va_check(unsafe { bindings::vaQuerySurfaceAttributes( self.display.handle(), self.id, std::ptr::null_mut(), - &attrs_len as *const _ as *mut std::os::raw::c_uint, + &mut attrs_len, ) })?; @@ -93,7 +93,7 @@ impl Config { self.display.handle(), self.id, attrs.as_mut_ptr(), - &attrs_len as *const _ as *mut std::os::raw::c_uint, + &mut attrs_len, ) })?;