From 207a5bfe453f80287a31b65e861c38dff8eb3428 Mon Sep 17 00:00:00 2001 From: Ed Sabol <22986767+esabol@users.noreply.github.com> Date: Tue, 16 Jul 2024 23:02:17 -0400 Subject: [PATCH 1/2] Fixed reversed calloc arguments in internals tests discovered with gcc 14.1. --- tests/libgearman-1.0/internals.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/libgearman-1.0/internals.cc b/tests/libgearman-1.0/internals.cc index c45c75680..8573c7231 100644 --- a/tests/libgearman-1.0/internals.cc +++ b/tests/libgearman-1.0/internals.cc @@ -318,7 +318,7 @@ static test_return_t gearman_packet_give_data_test(void *) // @note Since this is a give data, ignore any errors that believe there is // an implicit memory leak. size_t data_size= test_literal_param_size("Mine!"); - char *data= (char *)calloc(sizeof(char), data_size +1); + char *data= (char *)calloc(data_size +1, sizeof(char)); ASSERT_TRUE(data); memcpy(data, "Mine!", data_size); @@ -345,7 +345,7 @@ static test_return_t gearman_packet_take_data_test(void *) // Since this is a take data, ignore any errors that believe there is an // implicit memory leak. size_t data_size= test_literal_param_size("Mine!"); - char *data= (char *)calloc(sizeof(char), data_size +1); + char *data= (char *)calloc(data_size +1, sizeof(char)); ASSERT_TRUE(data); memcpy(data, "Mine!", data_size); From 9d7d1a8bdf8b9536ab036569d7014507b01d31db Mon Sep 17 00:00:00 2001 From: Ed Sabol <22986767+esabol@users.noreply.github.com> Date: Tue, 16 Jul 2024 23:18:24 -0400 Subject: [PATCH 2/2] Added gcc-14 build on Ubuntu 24.04 to testing matrix. --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 500ea991d..ba6dcff74 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,6 +28,7 @@ jobs: - {name: 'ubuntu-20.04 gcc-11', os: ubuntu-20.04, cc: 'gcc-11', cxx: 'g++-11', tag: '11', toolchain: 'ppa:ubuntu-toolchain-r/test'} - {name: 'ubuntu-22.04 gcc-12', os: ubuntu-22.04, cc: 'gcc-12', cxx: 'g++-12', tag: '12'} - {name: 'ubuntu-24.04 gcc-13', os: ubuntu-24.04, cc: 'gcc-13', cxx: 'g++-13', tag: '13'} + - {name: 'ubuntu-24.04 gcc-14', os: ubuntu-24.04, cc: 'gcc-14', cxx: 'g++-14', tag: '14'} env: CC: ${{ matrix.config.cc }}