Skip to content

Commit

Permalink
Add fun defs for wprintf, iswxdigit and .*wscanf #1239
Browse files Browse the repository at this point in the history
  • Loading branch information
karoliineh committed Nov 22, 2023
1 parent 4fa70bd commit 7159875
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/analyses/libraryFunctions.ml
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,8 @@ let c_descs_list: (string * LibraryDesc.t) list = LibraryDsl.[
("clearerr", unknown [drop "stream" [w]]);
("clearerr_unlocked", unknown [drop "stream" [w]]);
("setbuf", unknown [drop "stream" [w]; drop "buf" [w]]);
("wprintf", unknown (drop "fmt" [r] :: VarArgs (drop' [r])));
("fwprintf", unknown (drop "stream" [w] :: drop "fmt" [r] :: VarArgs (drop' [r])));
("swprintf", unknown (drop "wcs" [w] :: drop "maxlen" [] :: drop "fmt" [r] :: VarArgs (drop' [r])));
("assert", special [__ "exp" []] @@ fun exp -> Assert { exp; check = true; refine = get_bool "sem.assert.refine" }); (* only used if assert is used without include, e.g. in transformed files *)
("difftime", unknown [drop "time1" []; drop "time2" []]);
Expand Down Expand Up @@ -158,6 +160,9 @@ let c_descs_list: (string * LibraryDesc.t) list = LibraryDsl.[
("atomic_store", unknown [drop "obj" [w]; drop "desired" []]);
("_Exit", special [drop "status" []] @@ Abort);
("strcoll", unknown [drop "lhs" [r]; drop "rhs" [r]]);
("wscanf", unknown (drop "fmt" [r] :: VarArgs (drop' [r])));
("fwscanf", unknown (drop "stream" [r] :: drop "fmt" [r] :: VarArgs (drop' [r])));
("swscanf", unknown (drop "buffer" [r] :: drop "fmt" [r] :: VarArgs (drop' [r])));
]

(** C POSIX library functions.
Expand Down

0 comments on commit 7159875

Please sign in to comment.