]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUILD/MINOR: opentracing: fixed build when using clang
authorMiroslav Zagorac <mzagorac@haproxy.com>
Tue, 18 May 2021 18:05:10 +0000 (20:05 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 20 May 2021 03:25:02 +0000 (05:25 +0200)
The arguments of the snprintf() function are now consistent with the
format used.

This should fix the github issue #1242.

addons/ot/src/scope.c

index 8305f24d22b6be3d689f41954ef5eff2e2c5dd76..8d70a08d6240a010c7cff02013a471addedf359a 100644 (file)
@@ -116,8 +116,8 @@ struct flt_ot_runtime_context *flt_ot_runtime_context_init(struct stream *s, str
        (void)snprintf(retptr->uuid.s, sizeof(retptr->uuid.s), "%08x-%04hx-%04hx-%04hx-%012" PRIx64,
                       retptr->uuid.time_low,
                       retptr->uuid.time_mid,
-                      (retptr->uuid.time_hi_and_version & UINT16_C(0xfff)) | UINT16_C(0x4000),
-                      retptr->uuid.clock_seq | UINT16_C(0x8000),
+                      (uint16_t)((retptr->uuid.time_hi_and_version & UINT16_C(0xfff)) | UINT16_C(0x4000)),
+                      (uint16_t)(retptr->uuid.clock_seq | UINT16_C(0x8000)),
                       (uint64_t)retptr->uuid.node);
 
        if (flt_ot_var_register(FTL_OT_VAR_UUID, err) != -1)