From: Jérémie Galarneau Date: Mon, 16 Jan 2023 19:12:41 +0000 (-0500) Subject: Build fix: warning: clang warns that uuid_scan may be uninitialized X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=00c2aa6f664e9ec249fd297fb01309477917d029;p=lttng-tools.git Build fix: warning: clang warns that uuid_scan may be uninitialized clang warns that uuid_scan may be uninitialized. While this can't happen given the function's code flow, silence the warning by initializing uuid_scan. Signed-off-by: Jérémie Galarneau Change-Id: I143131663cde02234c47ec16c74ee9176e49c1cc --- diff --git a/src/common/uuid.cpp b/src/common/uuid.cpp index 770d95529..ddf0fb509 100644 --- a/src/common/uuid.cpp +++ b/src/common/uuid.cpp @@ -45,7 +45,7 @@ std::string lttng::utils::uuid_to_str(const lttng_uuid& uuid) int lttng_uuid_from_str(const char *str_in, lttng_uuid& uuid_out) { int ret = 0; - lttng_uuid uuid_scan; + lttng_uuid uuid_scan = {}; if (str_in == nullptr) { ret = -1;