Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update clang-format to version 19.1.5 #502

Merged
merged 2 commits into from
Dec 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions .github/workflows/clang-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,15 @@ on: [pull_request]

jobs:
clang-format:
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v2
- name: Install clang-tidy
- name: Install clang-tidy and clang-format
run: |
sudo apt-get update
sudo apt-get install -y clang-tidy
sudo apt-get install -y pipx
pipx install clang-format
clang-format --version
- name: Analyze
run: make format-check
6 changes: 3 additions & 3 deletions core/federated/federate.c
Original file line number Diff line number Diff line change
Expand Up @@ -1951,9 +1951,9 @@ void lf_connect_to_rti(const char* hostname, int port) {
if (result < 0)
continue; // Connect failed.

// Have connected to an RTI, but not sure it's the right RTI.
// Send a MSG_TYPE_FED_IDS message and wait for a reply.
// Notify the RTI of the ID of this federate and its federation.
// Have connected to an RTI, but not sure it's the right RTI.
// Send a MSG_TYPE_FED_IDS message and wait for a reply.
// Notify the RTI of the ID of this federate and its federation.

#ifdef FEDERATED_AUTHENTICATED
LF_PRINT_LOG("Connected to an RTI. Performing HMAC-based authentication using federation ID.");
Expand Down
2 changes: 1 addition & 1 deletion include/core/utils/impl/hashmap.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#define V void*
#endif
#ifndef HASH_OF
#define HASH_OF(key) (size_t) key
#define HASH_OF(key) (size_t)key
#endif
#ifndef HASHMAP
#define HASHMAP(token) hashmap##_##token
Expand Down
2 changes: 1 addition & 1 deletion include/core/utils/impl/pointer_hashmap.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
#define HASHMAP(token) hashmap_object2int##_##token
#define K void*
#define V int
#define HASH_OF(key) (size_t) key
#define HASH_OF(key) (size_t)key
#include "hashmap.h"
#undef HASHMAP
#undef K
Expand Down
9 changes: 3 additions & 6 deletions tag/api/tag.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)))
Expand Down
Loading