From c04d24d172add92d0e96d1284e86df4ff0d333f1 Mon Sep 17 00:00:00 2001 From: erlingrj <erling.jellum@gmail.com> Date: Thu, 12 Dec 2024 15:59:52 -0800 Subject: [PATCH] Update clang-format to 19.1.5 --- .github/workflows/ci.yml | 3 ++- include/reactor-uc/event.h | 3 +-- include/reactor-uc/tag.h | 9 +++------ 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f8129b35..c0c5c82c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,7 +21,8 @@ jobs: submodules: recursive - name: Install deps run: | - sudo apt-get install lcov + sudo apt-get install lcov pipx -y + sudo pipx install clang-format clang-tidy - name: Setup java and gradle for compiling lfc uses: ./.github/actions/lingua-franca # Uncomment to SSH into the runner. diff --git a/include/reactor-uc/event.h b/include/reactor-uc/event.h index b6993b0e..6b98669b 100644 --- a/include/reactor-uc/event.h +++ b/include/reactor-uc/event.h @@ -5,8 +5,7 @@ #include "reactor-uc/tag.h" #include <stdbool.h> -#define EVENT_INIT(Tag, Trigger, Payload) \ - { .tag = Tag, .trigger = Trigger, .payload = Payload } +#define EVENT_INIT(Tag, Trigger, Payload) {.tag = Tag, .trigger = Trigger, .payload = Payload} typedef struct Trigger Trigger; diff --git a/include/reactor-uc/tag.h b/include/reactor-uc/tag.h index c395e9d5..443ba5e1 100644 --- a/include/reactor-uc/tag.h +++ b/include/reactor-uc/tag.h @@ -37,15 +37,12 @@ #define NEVER_TAG \ (tag_t) { .time = NEVER, .microstep = NEVER_MICROSTEP } // Need a separate initializer expression to comply with some C compilers -#define NEVER_TAG_INITIALIZER \ - { NEVER, NEVER_MICROSTEP } +#define NEVER_TAG_INITIALIZER {NEVER, NEVER_MICROSTEP} #define FOREVER_TAG \ (tag_t) { .time = FOREVER, .microstep = FOREVER_MICROSTEP } // Need a separate initializer expression to comply with some C compilers -#define FOREVER_TAG_INITIALIZER \ - { FOREVER, FOREVER_MICROSTEP } -#define ZERO_TAG \ - (tag_t) { .time = 0LL, .microstep = 0u } +#define FOREVER_TAG_INITIALIZER {FOREVER, FOREVER_MICROSTEP} +#define ZERO_TAG (tag_t){.time = 0LL, .microstep = 0u} // Returns true if timeout has elapsed. #define CHECK_TIMEOUT(start, duration) (lf_time_physical() > ((start) + (duration)))