From 22d9015d4788bca8da7113ad187f0b04cfbc4216 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Tue, 30 Sep 2025 15:15:10 +0200 Subject: Fix some warnings raised by the macOS compiler. --- src/key.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/key.cc') diff --git a/src/key.cc b/src/key.cc index a5e92aac..f11f6323 100644 --- a/src/key.cc +++ b/src/key.cc @@ -108,9 +108,9 @@ Key::operator= (Key const & other) string Key::hex () const { - char buffer[_length * 2 + 1]; + std::vector buffer(_length * 2 + 1); - char* p = buffer; + char* p = buffer.data(); for (int i = 0; i < _length; ++i) { #ifdef LIBDCP_WINDOWS __mingw_snprintf (p, 3, "%02hhx", _value[i]); @@ -120,7 +120,7 @@ Key::hex () const p += 2; } - return buffer; + return string(buffer.data()); } -- cgit v1.2.3