Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package aws-c-common for openSUSE:Factory checked in at 2024-09-01 19:21:46 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/aws-c-common (Old) and /work/SRC/openSUSE:Factory/.aws-c-common.new.2698 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "aws-c-common" Sun Sep 1 19:21:46 2024 rev:12 rq:1197835 version:0.9.27 Changes: -------- --- /work/SRC/openSUSE:Factory/aws-c-common/aws-c-common.changes 2024-08-09 16:15:13.272327043 +0200 +++ /work/SRC/openSUSE:Factory/.aws-c-common.new.2698/aws-c-common.changes 2024-09-01 19:22:06.101673116 +0200 @@ -1,0 +2,9 @@ +Mon Aug 26 14:56:04 UTC 2024 - John Paul Adrian Glaubitz <adrian.glaub...@suse.com> + +- Update to version 0.9.27 + * Fix -Wuseless-cast compiler warnings by @graebm in (#1145) +- from version 0.9.26 + * Add cmake module for building dependencies + at configuration time by @sfod in (#1144) + +------------------------------------------------------------------- Old: ---- v0.9.25.tar.gz New: ---- v0.9.27.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ aws-c-common.spec ++++++ --- /var/tmp/diff_new_pack.r1gtzK/_old 2024-09-01 19:22:07.013710456 +0200 +++ /var/tmp/diff_new_pack.r1gtzK/_new 2024-09-01 19:22:07.013710456 +0200 @@ -19,7 +19,7 @@ %define library_version 1.0.0 %define library_soversion 1 Name: aws-c-common -Version: 0.9.25 +Version: 0.9.27 Release: 0 Summary: Core C99 package for AWS SDK for C License: Apache-2.0 ++++++ v0.9.25.tar.gz -> v0.9.27.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aws-c-common-0.9.25/cmake/AwsCheckHeaders.cmake new/aws-c-common-0.9.27/cmake/AwsCheckHeaders.cmake --- old/aws-c-common-0.9.25/cmake/AwsCheckHeaders.cmake 2024-08-01 20:44:38.000000000 +0200 +++ new/aws-c-common-0.9.27/cmake/AwsCheckHeaders.cmake 2024-08-14 00:10:15.000000000 +0200 @@ -63,13 +63,22 @@ C_STANDARD 99 ) - # Ensure our headers can be included by an application with its warnings set very high + # Ensure our headers can be included by an application with its warnings set very high. + # Most compiler options are universal, but some are C++ only. + set(compiler_options_all "") + set(compiler_options_cxx_only "") if(MSVC) - # MSVC complains about windows' own header files. Use /W4 instead of /Wall - target_compile_options(${HEADER_CHECKER_LIB} PRIVATE /W4 /WX) + # MSVC complains about windows' own header files. Use /W4 instead of /Wall + list(APPEND compiler_options_all /W4 /WX) else() - target_compile_options(${HEADER_CHECKER_LIB} PRIVATE -Wall -Wextra -Wpedantic -Werror) + list(APPEND compiler_options_all -Wall -Wextra -Wpedantic -Werror) + + if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU") + # -Wuseless-cast requested by https://github.com/awslabs/aws-c-common/issues/973 + list(APPEND compiler_options_cxx_only -Wuseless-cast) + endif() endif() + target_compile_options(${HEADER_CHECKER_LIB} PRIVATE ${compiler_options_all}) foreach(header IN LISTS ARGN) if (NOT ${header} MATCHES "\\.inl$") @@ -78,6 +87,7 @@ file(RELATIVE_PATH include_path "${CMAKE_CURRENT_SOURCE_DIR}/include" ${header}) # replace non-alphanumeric characters with underscores string(REGEX REPLACE "[^a-zA-Z0-9]" "_" unique_token ${include_path}) + # test compiling header from a .cpp and .c file (or just .cpp if this header IS_CXX) set(c_file "${HEADER_CHECKER_ROOT}/headerchecker_${unique_token}.c") set(cpp_file "${HEADER_CHECKER_ROOT}/headerchecker_${unique_token}.cpp") # include header twice to check for include-guards @@ -88,6 +98,11 @@ file(WRITE "${c_file}" "#include <${include_path}>\n#include <${include_path}>\nint ${unique_token}_c;\n") target_sources(${HEADER_CHECKER_LIB} PUBLIC "${c_file}") endif() + + # for .cpp file, apply C++ only compiler options + if(compiler_options_cxx_only) + set_source_files_properties(${cpp_file} PROPERTIES COMPILE_OPTIONS ${compiler_options_cxx_only}) + endif() endif() endforeach(header) endfunction() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aws-c-common-0.9.25/cmake/AwsPrebuildDependency.cmake new/aws-c-common-0.9.27/cmake/AwsPrebuildDependency.cmake --- old/aws-c-common-0.9.25/cmake/AwsPrebuildDependency.cmake 1970-01-01 01:00:00.000000000 +0100 +++ new/aws-c-common-0.9.27/cmake/AwsPrebuildDependency.cmake 2024-08-14 00:10:15.000000000 +0200 @@ -0,0 +1,73 @@ +# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +# SPDX-License-Identifier: Apache-2.0. + +# Build given dependency project during CMake configuration step and install it into CMAKE_BINARY_DIR. +# Arguments: +# DEPENDENCY_NAME Project name that should be built and installed. +# SOURCE_DIR Path to the project. +# CMAKE_ARGUMENTS Additional arguments that will be passed to cmake command. +# +# Set ${DEPENDENCY_NAME}_PREBUILT variable on success. +function(prebuild_dependency) + set(oneValueArgs DEPENDENCY_NAME SOURCE_DIR) + set(multiValueArgs CMAKE_ARGUMENTS) + cmake_parse_arguments(AWS_PREBUILD "" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) + + if(NOT AWS_PREBUILD_DEPENDENCY_NAME) + message(FATAL_ERROR "Missing DEPENDENCY_NAME argument in prebuild_dependency function") + endif() + + if(NOT AWS_PREBUILD_SOURCE_DIR) + message(FATAL_ERROR "Missing SOURCE_DIR argument in prebuild_dependency function") + endif() + + set(depBinaryDir ${CMAKE_BINARY_DIR}/deps/${AWS_PREBUILD_DEPENDENCY_NAME}) + set(depInstallDir ${depBinaryDir}/install) + file(MAKE_DIRECTORY ${depBinaryDir}) + + # For execute_process to accept a dynamically constructed command, it should be passed in a list format. + set(cmakeCommand "COMMAND" "${CMAKE_COMMAND}") + list(APPEND cmakeCommand -S ${AWS_PREBUILD_SOURCE_DIR}) + list(APPEND cmakeCommand -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}) + list(APPEND cmakeCommand -DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH}) + list(APPEND cmakeCommand -DCMAKE_INSTALL_PREFIX=${depInstallDir}) + list(APPEND cmakeCommand -DCMAKE_INSTALL_RPATH=${CMAKE_INSTALL_RPATH}) + list(APPEND cmakeCommand -DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS}) + + # Append provided arguments to CMake command. + if(AWS_PREBUILD_CMAKE_ARGUMENTS) + list(APPEND cmakeCommand ${AWS_PREBUILD_CMAKE_ARGUMENTS}) + endif() + + list(APPEND cmakeCommand WORKING_DIRECTORY ${depBinaryDir}) + list(APPEND cmakeCommand RESULT_VARIABLE result) + + # Configure dependency project. + execute_process(${cmakeCommand}) + if (NOT ${result} EQUAL 0) + message(FATAL_ERROR "Configuration failed for dependency project ${AWS_PREBUILD_DEPENDENCY_NAME}") + endif() + + # Build and install dependency project into depInstallDir directory. + execute_process( + COMMAND ${CMAKE_COMMAND} --build . --target install + WORKING_DIRECTORY ${depBinaryDir} + RESULT_VARIABLE result + ) + if (NOT ${result} EQUAL 0) + message(FATAL_ERROR "Build failed for dependency project ${AWS_PREBUILD_DEPENDENCY_NAME}") + endif() + + # Make the installation visible for others. + list(INSERT CMAKE_PREFIX_PATH 0 ${depInstallDir}/) + set(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} PARENT_SCOPE) + + set(${AWS_PREBUILD_DEPENDENCY_NAME}_PREBUILT TRUE CACHE INTERNAL "Indicate that dependency is built and can be used") + + # Generates installation rules for the dependency project. + # On installing targets, CMake will just copy this prebuilt version to a designated installation directory. + install( + DIRECTORY ${depInstallDir}/ + DESTINATION ${CMAKE_INSTALL_PREFIX} + ) +endfunction() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aws-c-common-0.9.25/include/aws/common/array_list.inl new/aws-c-common-0.9.27/include/aws/common/array_list.inl --- old/aws-c-common-0.9.25/include/aws/common/array_list.inl 2024-08-01 20:44:38.000000000 +0200 +++ new/aws-c-common-0.9.27/include/aws/common/array_list.inl 2024-08-14 00:10:15.000000000 +0200 @@ -123,7 +123,7 @@ void aws_array_list_clean_up_secure(struct aws_array_list *AWS_RESTRICT list) { AWS_PRECONDITION(AWS_IS_ZEROED(*list) || aws_array_list_is_valid(list)); if (list->alloc && list->data) { - aws_secure_zero((void *)list->data, list->current_size); + aws_secure_zero(list->data, list->current_size); aws_mem_release(list->alloc, list->data); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aws-c-common-0.9.25/include/aws/common/math.inl new/aws-c-common-0.9.27/include/aws/common/math.inl --- old/aws-c-common-0.9.25/include/aws/common/math.inl 2024-08-01 20:44:38.000000000 +0200 +++ new/aws-c-common-0.9.27/include/aws/common/math.inl 2024-08-14 00:10:15.000000000 +0200 @@ -51,7 +51,12 @@ #ifdef _MSC_VER # pragma warning(push) # pragma warning(disable : 4127) /*Disable "conditional expression is constant" */ -#endif /* _MSC_VER */ +#elif defined(__GNUC__) +# pragma GCC diagnostic push +# if defined(__cplusplus) && !defined(__clang__) +# pragma GCC diagnostic ignored "-Wuseless-cast" /* Warning is C++ only (not C), and GCC only (not clang) */ +# endif +#endif AWS_STATIC_IMPL uint64_t aws_sub_u64_saturating(uint64_t a, uint64_t b) { return a <= b ? 0 : a - b; @@ -190,6 +195,8 @@ #ifdef _MSC_VER # pragma warning(pop) +#elif defined(__GNUC__) +# pragma GCC diagnostic pop #endif /* _MSC_VER */ AWS_STATIC_IMPL uint8_t aws_min_u8(uint8_t a, uint8_t b) {