Run clang-tidy in the CI

This commit is contained in:
jvoisin 2021-12-31 17:24:43 +01:00
parent 9142a9376b
commit ba2b80b0e5
2 changed files with 4 additions and 2 deletions

View file

@ -17,8 +17,10 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: Install dependencies
run: sudo apt install -qq -y --no-install-recommends clang-tidy
- name: Build - name: Build
run: CC=clang CXX=clang++ make test run: CC=clang CXX=clang++ make tidy test
build-musl: build-musl:
runs-on: ubuntu-latest runs-on: ubuntu-latest
container: container:

2
util.h
View file

@ -28,7 +28,7 @@
#define STRINGIFY(s) #s #define STRINGIFY(s) #s
#define ALIAS(f) __attribute__((alias(STRINGIFY(f)))) #define ALIAS(f) __attribute__((alias(STRINGIFY(f))))
static inline int ffzl(long x) { static inline int ffzl(unsigned long x) {
return __builtin_ffsl(~x); return __builtin_ffsl(~x);
} }