Skip to content

Commit

Permalink
c2rust: Silence unused error
Browse files Browse the repository at this point in the history
  • Loading branch information
chrysn committed Feb 24, 2025
1 parent fc98bcb commit 71db0c4
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions riot-c2rust.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,16 @@
#define __builtin_arm_get_fpscr __masked_builtin_arm_get_fpscr
#define __builtin_arm_set_fpscr __masked_builtin_arm_set_fpscr
extern int missing_implementation_for_fpscr_in_c2rust_see_issue_345;
/* Not having this attribute doesn't cause builds to fail, because there are no
* super strict checks active here; still, c2rust emits unused code warnigns as
* errors (without them actually being critical), and that can distract from
* the actual issue because when something else goes wrong and this is shown as
* an error, as seen in https://github.com/RIOT-OS/RIOT/issues/21079 */
__attribute__((unused))
static inline int __masked_builtin_arm_get_fpscr(void) {
return missing_implementation_for_fpscr_in_c2rust_see_issue_345;
}
__attribute__((unused))
static inline void __masked_builtin_arm_set_fpscr(int fpscr){
missing_implementation_for_fpscr_in_c2rust_see_issue_345 = fpscr;
}
Expand Down

0 comments on commit 71db0c4

Please sign in to comment.