Skip to content

Commit

Permalink
Merge pull request #502 from lf-lang/clang-format-19
Browse files Browse the repository at this point in the history
Update clang-format to version 19.1.5
  • Loading branch information
erlingrj authored Dec 10, 2024
2 parents 3152ea3 + 8cd66aa commit a252c62
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
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

0 comments on commit a252c62

Please sign in to comment.