1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

ci: fix all -cstrict warnings with gcc and clang (#9792)

This commit is contained in:
spaceface
2021-04-19 14:38:48 +02:00
committed by GitHub
parent dde3189e66
commit 73352583e7
37 changed files with 295 additions and 296 deletions

View File

@@ -41,7 +41,7 @@ pub fn load(path string) ?Image {
}
// flag := if ext == 'png' { C.STBI_rgb_alpha } else { 0 }
desired_channels := if ext == 'png' { 4 } else { 0 }
res.data = C.stbi_load(path.str, &res.width, &res.height, &res.nr_channels, desired_channels)
res.data = C.stbi_load(&char(path.str), &res.width, &res.height, &res.nr_channels, desired_channels)
if desired_channels == 4 && res.nr_channels == 3 {
// Fix an alpha png bug
res.nr_channels = 4