From e6cd5dc8ba1be714c5a2ae18fd93837b06714d95 Mon Sep 17 00:00:00 2001 From: Erik Boasson Date: Wed, 6 Mar 2024 10:20:53 +0100 Subject: [PATCH] Fix a false positive "may be used uninitialized" Signed-off-by: Erik Boasson --- src/core/ddsc/src/dds_write.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/core/ddsc/src/dds_write.c b/src/core/ddsc/src/dds_write.c index 34e4b2e458..7f51867bb9 100644 --- a/src/core/ddsc/src/dds_write.c +++ b/src/core/ddsc/src/dds_write.c @@ -680,7 +680,7 @@ static dds_return_t dds_write_impl_psmxloan_serdata (struct dds_writer *wr, cons dds_loaned_sample_unref (loan); return DDS_RETCODE_BAD_PARAMETER; } - break; + return DDS_RETCODE_OK; case DDS_LOAN_ORIGIN_KIND_HEAP: if (wr->m_endpoint.psmx_endpoints.length == 0) { @@ -718,9 +718,9 @@ static dds_return_t dds_write_impl_psmxloan_serdata (struct dds_writer *wr, cons return DDS_RETCODE_OUT_OF_RESOURCES; } } - break; + return DDS_RETCODE_OK; } - return DDS_RETCODE_OK; + return DDS_RETCODE_ERROR; } else if (use_only_psmx && sertype->is_memcpy_safe) {