X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=src%2Fcommon%2Fuuid.cpp;h=8aa42a4e6fc4b579d55f84d4bcceca43f70a4ef0;hb=1098ec7b02bbfd71e0b84f79f86212173831652f;hp=770d95529c685b95fb54ca2cd9e3c469c19c7a9f;hpb=28ab034a2c3582d07d3423d2d746731f87d3969f;p=lttng-tools.git diff --git a/src/common/uuid.cpp b/src/common/uuid.cpp index 770d95529..8aa42a4e6 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; @@ -83,7 +83,7 @@ int lttng_uuid_generate(lttng_uuid& uuid_out) if (!lttng_uuid_is_init) { try { srand(lttng::random::produce_best_effort_random_seed()); - } catch (std::exception& e) { + } catch (const std::exception& e) { ERR("Failed to initialize random seed during generation of UUID: %s", e.what()); ret = -1;