Skip to content

Commit

Permalink
fix: Add some temporary hacks for ordered-events PR.
Browse files Browse the repository at this point in the history
The "pure function" analysis needs to be written. For now, it's a manual
list of allowed functions in assert.
  • Loading branch information
iphydf committed Dec 20, 2023
1 parent 075e030 commit a781678
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Tokstyle/C/Linter/Conversion.hs
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@ checkConversion context (r, removeQuals -> rTy) (l, removeQuals -> lTy) =
(_,"unsigned int") -> return ()
(_,"int") -> return ()
(_,"long") -> return ()

-- TODO(iphydf): Remove once the "system" PR is in.
("const struct Memory *","Memory const *") -> return ()
(rTyName, lTyName) ->
recordError $ typeMismatch
("invalid conversion from `" <> rTyName <> "` to `" <>
Expand Down
1 change: 1 addition & 0 deletions src/Tokstyle/Linter/Assert.hs
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ checkAssertArg file name expr =
[ "make_family"
, "memcmp"
, "shared_key_is_empty"
, "tox_events_get_size"
]


Expand Down

0 comments on commit a781678

Please sign in to comment.