Skip to content

Commit 3a793de

Browse files
committed
Try fixing lint errors
1 parent dd2f7d2 commit 3a793de

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

.github/workflows/ci-pr-validation.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ jobs:
9292

9393
- name: Build the project
9494
run: |
95-
cmake -B build -DINTEGRATE_VCPKG=ON -DVCPKG_TARGET_TRIPLET=x64-linux-release -DBUILD_TESTS=ON -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
95+
cmake -B build -DINTEGRATE_VCPKG=ON -DBUILD_TESTS=ON -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
9696
cmake --build build -j8
9797
9898
- name: Tidy check
@@ -119,7 +119,7 @@ jobs:
119119

120120
- name: Build core libraries
121121
run: |
122-
cmake -B build -DINTEGRATE_VCPKG=ON -DVCPKG_TARGET_TRIPLET=x64-linux-release -DBUILD_TESTS=OFF
122+
cmake -B build -DINTEGRATE_VCPKG=ON -DBUILD_TESTS=OFF
123123
cmake --build build -j8
124124
125125
- name: Check formatting
@@ -132,7 +132,7 @@ jobs:
132132
133133
- name: Build tests
134134
run: |
135-
cmake -B build -DINTEGRATE_VCPKG=ON -DVCPKG_TARGET_TRIPLET=x64-linux-release -DBUILD_TESTS=ON -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
135+
cmake -B build -DINTEGRATE_VCPKG=ON -DBUILD_TESTS=ON -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
136136
cmake --build build -j8
137137
138138
- name: Install gtest-parallel
@@ -144,13 +144,13 @@ jobs:
144144

145145
- name: Build perf tools
146146
run: |
147-
cmake -B build -DINTEGRATE_VCPKG=ON -DVCPKG_TARGET_TRIPLET=x64-linux-release -DBUILD_TESTS=ON -DBUILD_PERF_TOOLS=ON
147+
cmake -B build -DINTEGRATE_VCPKG=ON -DBUILD_TESTS=ON -DBUILD_PERF_TOOLS=ON
148148
cmake --build build -j8
149149
150150
- name: Verify custom vcpkg installation
151151
run: |
152152
mv vcpkg /tmp/
153-
cmake -B build-2 -DINTEGRATE_VCPKG=ON -DVCPKG_TARGET_TRIPLET=x64-linux-release -DCMAKE_TOOLCHAIN_FILE="/tmp/vcpkg/scripts/buildsystems/vcpkg.cmake"
153+
cmake -B build-2 -DINTEGRATE_VCPKG=ON -DCMAKE_TOOLCHAIN_FILE="/tmp/vcpkg/scripts/buildsystems/vcpkg.cmake"
154154
155155
cpp20-build:
156156
name: Build with the C++20 standard

tests/AuthPluginTest.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,7 @@ void mockZTS(Latch& latch, int port) {
338338
}
339339
}
340340

341+
acceptor.close();
341342
LOG_INFO("-- MockZTS exiting");
342343
}
343344
} // namespace testAthenz

tests/c/c_BasicEndToEndTest.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ static void send_callback(pulsar_result async_result, pulsar_message_id_t *msg_i
4242
send_ctx->result = async_result;
4343
if (async_result == pulsar_result_Ok) {
4444
const char *msg_id_str = pulsar_message_id_str(msg_id);
45-
send_ctx->msg_id = (char *)malloc(strlen(msg_id_str) * sizeof(char));
45+
send_ctx->msg_id = (char *)malloc(strlen(msg_id_str) * sizeof(char) + 1);
4646
strcpy(send_ctx->msg_id, msg_id_str);
4747
}
4848
send_ctx->promise->set_value();
@@ -55,7 +55,7 @@ static void receive_callback(pulsar_result async_result, pulsar_message_t *msg,
5555
if (async_result == pulsar_result_Ok &&
5656
pulsar_consumer_acknowledge(receive_ctx->consumer, msg) == pulsar_result_Ok) {
5757
const char *data = (const char *)pulsar_message_get_data(msg);
58-
receive_ctx->data = (char *)malloc(strlen(data) * sizeof(char));
58+
receive_ctx->data = (char *)malloc(strlen(data) * sizeof(char) + 1);
5959
strcpy(receive_ctx->data, data);
6060
}
6161
receive_ctx->promise->set_value();

0 commit comments

Comments
 (0)