Build fix: warning: clang warns that uuid_scan may be uninitialized
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Mon, 16 Jan 2023 19:12:41 +0000 (14:12 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Tue, 17 Jan 2023 03:40:21 +0000 (22:40 -0500)
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 <jeremie.galarneau@efficios.com>
Change-Id: I143131663cde02234c47ec16c74ee9176e49c1cc

src/common/uuid.cpp

index 770d95529c685b95fb54ca2cd9e3c469c19c7a9f..ddf0fb509c9fe45fab7067820b1032e657c4e3a3 100644 (file)
@@ -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;
This page took 0.024616 seconds and 4 git commands to generate.