Commit cef4e69
Merge #168
168: Silence compiler warnings from bindgen tests r=jethrogb a=raoulstrackx
Compiling `rust-mbedtls` results in 627 warnings similar to:
```
assert_eq!(
unsafe { &(*(::core::ptr::null::<arc4_context>())).y as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(arc4_context),
"::",
stringify!(y)
)
);
```
all of these warnings come from `bindgen` tests and check whether a specific field of a struct has the expected size. The null pointer is only used to specify the field it wants to verify. The null pointer is never dereferenced at runtime. Still, having so many warnings in a crypto library is scary and annoying. This PR silences warnings of null pointer dereferences, but only for `bindgen` code and in debug mode.
[PR167](#167) merged the same commit, but to the wrong branch.
Co-authored-by: Raoul Strackx <raoul.strackx@fortanix.com>1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
135 | 135 | | |
136 | 136 | | |
137 | 137 | | |
138 | | - | |
| 138 | + | |
139 | 139 | | |
140 | 140 | | |
141 | 141 | | |
| |||
0 commit comments