1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-18 12:52:44 +01:00
RIOT/cpu/sam0_common/include/vendor/fix_cxx_compat.sh
Marian Buschsieweke a4bf63e483
cpu/sam0_common: fix vendor header files
Drop type qualifiers in front of anonymous bit fields (padding for
reserved bits) for compatibility with `clang++`. A four line bash
script was added to ease fixing new vendor header files.
2023-07-18 12:24:07 +02:00

11 lines
295 B
Bash
Executable File

#!/bin/sh
# This script removes type qualifiers from anonymous padding fields in bit
# fields for compatibility with clang++.
offenders="$(grep -Erl '__I [u]*int[0-9]*_t[ \t]*:[0-9]*;')"
for file in $offenders; do
sed -i "$file" -e 's/__I \([u]*int[0-9]*_t[\t ]*:[0-9]*;\)/\1 /g'
done