Skip to content

Commit 8fc22b6

Browse files
committed
Delete unportable functions
1 parent 68e877d commit 8fc22b6

6 files changed

Lines changed: 0 additions & 112 deletions

File tree

rules/cstring/ir_unsafe.json

Lines changed: 0 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -882,63 +882,6 @@
882882
"type": "i32"
883883
}
884884
},
885-
"f28": {
886-
"body": [
887-
{
888-
"text": "libc::strerror_r("
889-
},
890-
{
891-
"placeholder": {
892-
"arg": 0,
893-
"access": "read"
894-
}
895-
},
896-
{
897-
"text": ", "
898-
},
899-
{
900-
"placeholder": {
901-
"arg": 1,
902-
"access": "read"
903-
}
904-
},
905-
{
906-
"text": " as *mut i8, "
907-
},
908-
{
909-
"placeholder": {
910-
"arg": 2,
911-
"access": "read"
912-
}
913-
},
914-
{
915-
"text": " as ::libc::size_t);\n "
916-
},
917-
{
918-
"placeholder": {
919-
"arg": 1,
920-
"access": "read"
921-
}
922-
}
923-
],
924-
"multi_statement": true,
925-
"params": {
926-
"a0": {
927-
"type": "i32"
928-
},
929-
"a1": {
930-
"type": "*mut u8",
931-
"is_unsafe_pointer": true
932-
},
933-
"a2": {
934-
"type": "u64"
935-
}
936-
},
937-
"return_type": {
938-
"type": "*mut u8",
939-
"is_unsafe_pointer": true
940-
}
941-
},
942885
"f3": {
943886
"body": [
944887
{

rules/cstring/src.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,3 @@ void *f24(const void *a0, int a1, size_t a2) { return memrchr(a0, a1, a2); }
4040
#endif
4141

4242
int f27(const char *a0, const char *a1) { return strcasecmp(a0, a1); }
43-
44-
char* f28(int errnum, char *buf, size_t buflen) {
45-
return strerror_r(errnum, buf, buflen);
46-
}

rules/cstring/tgt_unsafe.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,3 @@ unsafe fn f26(a0: *mut u8, a1: i32, a2: usize) -> *mut ::libc::c_void {
130130
unsafe fn f27(a0: *const u8, a1: *const u8) -> i32 {
131131
libc::strcasecmp(a0 as *const i8, a1 as *const i8)
132132
}
133-
134-
unsafe fn f28(a0: i32, a1: *mut u8, a2: u64) -> *mut u8 {
135-
libc::strerror_r(a0, a1 as *mut i8, a2 as ::libc::size_t);
136-
a1
137-
}

rules/time/ir_unsafe.json

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -61,44 +61,6 @@
6161
"type": "i32"
6262
}
6363
},
64-
"f3": {
65-
"body": [
66-
{
67-
"text": "libc::gettimeofday("
68-
},
69-
{
70-
"placeholder": {
71-
"arg": 0,
72-
"access": "read"
73-
}
74-
},
75-
{
76-
"text": ", "
77-
},
78-
{
79-
"placeholder": {
80-
"arg": 1,
81-
"access": "read"
82-
}
83-
},
84-
{
85-
"text": " as *mut ::libc::timezone)"
86-
}
87-
],
88-
"params": {
89-
"a0": {
90-
"type": "*mut ::libc::timeval",
91-
"is_unsafe_pointer": true
92-
},
93-
"a1": {
94-
"type": "*mut ::libc::timezone",
95-
"is_unsafe_pointer": true
96-
}
97-
},
98-
"return_type": {
99-
"type": "i32"
100-
}
101-
},
10264
"f4": {
10365
"body": [
10466
{

rules/time/src.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,6 @@ int f2(clockid_t clk_id, struct timespec *tp) {
1010
return clock_gettime(clk_id, tp);
1111
}
1212

13-
int f3(struct timeval *tv, struct timezone *tz) {
14-
return gettimeofday(tv, tz);
15-
}
16-
1713
struct tm *f4(const time_t *timer, struct tm *result) {
1814
return gmtime_r(timer, result);
1915
}

rules/time/tgt_unsafe.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,6 @@ unsafe fn f2(a0: ::libc::clockid_t, a1: *mut ::libc::timespec) -> i32 {
99
libc::clock_gettime(a0, a1)
1010
}
1111

12-
unsafe fn f3(a0: *mut ::libc::timeval, a1: *mut ::libc::timezone) -> i32 {
13-
libc::gettimeofday(a0, a1 as *mut ::libc::timezone)
14-
}
15-
1612
unsafe fn f4(a0: *const ::libc::time_t, a1: *mut ::libc::tm) -> *mut ::libc::tm {
1713
libc::gmtime_r(a0, a1)
1814
}

0 commit comments

Comments
 (0)