From a6d2098a4b41a07ee9114ea64a45d448583d30f7 Mon Sep 17 00:00:00 2001 From: Hunter Rick Date: Fri, 15 Dec 2023 19:21:20 -0800 Subject: [PATCH] Fixed errors in various distro builds due to implicit data conversions --- scripts/ci_checks/linux-checks/pulseaudio-versions.sh | 2 +- scripts/ci_checks/macos/standard-build.sh | 2 +- .../roc_sndio/target_sndfile/roc_sndio/sndfile_source.cpp | 6 +++--- .../roc_sndio/target_sndfile/roc_sndio/sndfile_source.h | 2 +- src/tests/roc_sndio/test_pump.cpp | 1 + 5 files changed, 7 insertions(+), 6 deletions(-) diff --git a/scripts/ci_checks/linux-checks/pulseaudio-versions.sh b/scripts/ci_checks/linux-checks/pulseaudio-versions.sh index 24d0fd399e..b263007caa 100755 --- a/scripts/ci_checks/linux-checks/pulseaudio-versions.sh +++ b/scripts/ci_checks/linux-checks/pulseaudio-versions.sh @@ -8,6 +8,6 @@ do --enable-werror \ --enable-tests \ --enable-examples \ - --build-3rdparty=openfec,pulseaudio:$pulse_ver \ + --build-3rdparty=openfec,pulseaudio:$pulse_ver,sndfile \ test done diff --git a/scripts/ci_checks/macos/standard-build.sh b/scripts/ci_checks/macos/standard-build.sh index b2d6a3bd47..5c77985ee2 100755 --- a/scripts/ci_checks/macos/standard-build.sh +++ b/scripts/ci_checks/macos/standard-build.sh @@ -5,7 +5,7 @@ set -euxo pipefail brew install \ automake scons ragel gengetopt \ libuv speexdsp sox openssl@3 \ - cpputest google-benchmark sndfile + cpputest google-benchmark libsndfile # debug build scons -Q \ diff --git a/src/internal_modules/roc_sndio/target_sndfile/roc_sndio/sndfile_source.cpp b/src/internal_modules/roc_sndio/target_sndfile/roc_sndio/sndfile_source.cpp index f975e9e3d6..999cb60765 100644 --- a/src/internal_modules/roc_sndio/target_sndfile/roc_sndio/sndfile_source.cpp +++ b/src/internal_modules/roc_sndio/target_sndfile/roc_sndio/sndfile_source.cpp @@ -339,14 +339,14 @@ bool SndfileSource::seek_(size_t offset) { roc_panic("sndfile source: seek: not a file"); } - roc_log(LogDebug, "sndfile source: resetting position to %ld", offset); + roc_log(LogDebug, "sndfile source: resetting position to %lu", (unsigned long)offset); sf_count_t err = sf_seek(sndfile_input_, (sf_count_t)offset, SEEK_SET); if (err == -1) { roc_log(LogError, - "sndfile source: can't reset position to %ld: an attempt was made to " + "sndfile source: can't reset position to %lu: an attempt was made to " "seek beyond the start or end of the file", - offset); + (unsigned long)offset); return false; } diff --git a/src/internal_modules/roc_sndio/target_sndfile/roc_sndio/sndfile_source.h b/src/internal_modules/roc_sndio/target_sndfile/roc_sndio/sndfile_source.h index 9b3b06dcbd..ae2e3c6ee0 100644 --- a/src/internal_modules/roc_sndio/target_sndfile/roc_sndio/sndfile_source.h +++ b/src/internal_modules/roc_sndio/target_sndfile/roc_sndio/sndfile_source.h @@ -7,7 +7,7 @@ */ //! @file roc_sndio/target_sndfile/roc_sndio/sndfile_source.h -//! @brief SoX source. +//! @brief Sndfile source. #ifndef ROC_SNDIO_SNDFILE_SOURCE_H_ #define ROC_SNDIO_SNDFILE_SOURCE_H_ diff --git a/src/tests/roc_sndio/test_pump.cpp b/src/tests/roc_sndio/test_pump.cpp index 63581bcf27..cef4c423ce 100644 --- a/src/tests/roc_sndio/test_pump.cpp +++ b/src/tests/roc_sndio/test_pump.cpp @@ -16,6 +16,7 @@ #include "roc_core/stddefs.h" #include "roc_core/temp_file.h" #include "roc_sndio/pump.h" +#include "roc_sndio/config.h" #ifdef ROC_TARGET_SOX #include "roc_sndio/sox_sink.h" #include "roc_sndio/sox_source.h"