summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2024-12-02 20:38:20 -0500
committerDavid Robillard <d@drobilla.net>2024-12-02 20:38:20 -0500
commit936d5cd00b5ade6bb5e5f72ecb62a2e41414c590 (patch)
tree8f8757ce1d753f4bd769d50bbb9ffe96b5e45004
parent1876eb0bfb5152761d523db0c76fd5d81d437e57 (diff)
downloadingen-936d5cd00b5ade6bb5e5f72ecb62a2e41414c590.tar.gz
ingen-936d5cd00b5ade6bb5e5f72ecb62a2e41414c590.tar.bz2
ingen-936d5cd00b5ade6bb5e5f72ecb62a2e41414c590.zip
Fix potential use of uninitialized value
According to GCC's -Wmaybe-uninitialized, this is a potential use of an uninitialized value. I'm not seeing it, but the pattern with get_property() everywhere else is to store the return value as a reference, which makes the warning go away, so do that.
-rw-r--r--src/server/DuplexPort.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/server/DuplexPort.cpp b/src/server/DuplexPort.cpp
index f1b3af61..1e07afd2 100644
--- a/src/server/DuplexPort.cpp
+++ b/src/server/DuplexPort.cpp
@@ -97,7 +97,7 @@ DuplexPort::duplicate(Engine& engine,
GraphImpl* parent)
{
BufferFactory& bufs = *engine.buffer_factory();
- const Atom polyphonic = get_property(bufs.uris().ingen_polyphonic);
+ const Atom& polyphonic = get_property(bufs.uris().ingen_polyphonic);
auto* dup = new DuplexPort(
bufs, parent, symbol, _index,