From 476ff691b0825cc6fe4c87b4c839073f7df77494 Mon Sep 17 00:00:00 2001 From: iphydf Date: Thu, 4 Jan 2024 15:28:15 +0000 Subject: [PATCH] fix: Allow non-const array to be assigned to const array. We should really do a const removal from array/pointer types for this check, but for now this works. --- src/Tokstyle/C/Linter/Conversion.hs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Tokstyle/C/Linter/Conversion.hs b/src/Tokstyle/C/Linter/Conversion.hs index e624e2e..6fe0ba0 100644 --- a/src/Tokstyle/C/Linter/Conversion.hs +++ b/src/Tokstyle/C/Linter/Conversion.hs @@ -52,6 +52,7 @@ checkConversion _ (_, rTy) (_, lTy) | isEnumConversion (canonicalType lTy) rTy = checkConversion context (r, removeQuals -> rTy) (l, removeQuals -> lTy) = case (show $ pretty rTy, show $ pretty lTy) of (rTyName, lTyName) | rTyName == lTyName -> return () + ("uint8_t [32]","uint8_t const [32]") -> return () ("char *","const char *") -> return () ("const int *","const char *") -> return () ("int","vpx_codec_er_flags_t") -> return ()