From d5e9f34b6a3cf309178389ac996b6ff0130a2cb7 Mon Sep 17 00:00:00 2001 From: lifning <> Date: Mon, 26 Jul 2021 20:51:11 -0700 Subject: [PATCH] fix build on platforms where std::os::raw::c_char is not i8 c_char may be i8 or u8, depending on target platform: https://doc.rust-lang.org/std/os/raw/type.c_char.html --- src/util/error.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/util/error.rs b/src/util/error.rs index e3ae2a8..3e827e2 100644 --- a/src/util/error.rs +++ b/src/util/error.rs @@ -201,8 +201,7 @@ fn index(error: &Error) -> usize { } // XXX: the length has to be synced with the number of errors -static mut STRINGS: [[c_char; AV_ERROR_MAX_STRING_SIZE]; 27] = - [[0_i8; AV_ERROR_MAX_STRING_SIZE]; 27]; +static mut STRINGS: [[c_char; AV_ERROR_MAX_STRING_SIZE]; 27] = [[0; AV_ERROR_MAX_STRING_SIZE]; 27]; pub fn register_all() { unsafe {