From 783d8adb15a8559c02ef99029775fa0096778b7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bence=20Sz=C3=A9pk=C3=BAti?= Date: Mon, 18 Aug 2025 14:31:34 +0200 Subject: [PATCH] Update CMake linkage tests to new call signature MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Bence Szépkúti --- programs/test/cmake_package/cmake_package.c | 5 +---- programs/test/cmake_package_install/cmake_package_install.c | 5 +---- programs/test/cmake_subproject/cmake_subproject.c | 5 +---- 3 files changed, 3 insertions(+), 12 deletions(-) diff --git a/programs/test/cmake_package/cmake_package.c b/programs/test/cmake_package/cmake_package.c index f7d5230f46..cd050e97bc 100644 --- a/programs/test/cmake_package/cmake_package.c +++ b/programs/test/cmake_package/cmake_package.c @@ -18,10 +18,7 @@ * linkage works, but that is all. */ int main() { - /* This version string is 18 bytes long, as advised by version.h. */ - char version[18]; - - mbedtls_version_get_string_full(version); + const char *version = mbedtls_version_get_string_full(); mbedtls_printf("Built against %s\n", version); diff --git a/programs/test/cmake_package_install/cmake_package_install.c b/programs/test/cmake_package_install/cmake_package_install.c index fb68883fee..a63f7dbb0f 100644 --- a/programs/test/cmake_package_install/cmake_package_install.c +++ b/programs/test/cmake_package_install/cmake_package_install.c @@ -19,10 +19,7 @@ * linkage works, but that is all. */ int main() { - /* This version string is 18 bytes long, as advised by version.h. */ - char version[18]; - - mbedtls_version_get_string_full(version); + const char *version = mbedtls_version_get_string_full(); mbedtls_printf("Built against %s\n", version); diff --git a/programs/test/cmake_subproject/cmake_subproject.c b/programs/test/cmake_subproject/cmake_subproject.c index efab789553..69b5d0b819 100644 --- a/programs/test/cmake_subproject/cmake_subproject.c +++ b/programs/test/cmake_subproject/cmake_subproject.c @@ -19,10 +19,7 @@ * linkage works, but that is all. */ int main() { - /* This version string is 18 bytes long, as advised by version.h. */ - char version[18]; - - mbedtls_version_get_string_full(version); + const char *version = mbedtls_version_get_string_full(); mbedtls_printf("Built against %s\n", version);