Skip to content

Commit

Permalink
fix: Allow non-const array to be assigned to const array.
Browse files Browse the repository at this point in the history
We should really do a const removal from array/pointer types for this
check, but for now this works.
  • Loading branch information
iphydf committed Jan 4, 2024
1 parent e466271 commit 476ff69
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/Tokstyle/C/Linter/Conversion.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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 ()
Expand Down

0 comments on commit 476ff69

Please sign in to comment.