warning: 'enc_b64_blob' may be used uninitialized in this function
I'm seeing:
src/or/hs_descriptor.c: In function 'desc_encode_v3':
src/or/hs_descriptor.c:787: warning: 'enc_b64_blob' may be used uninitialized in this function
It looks like any situation where enc_b64_blob doesn't get initialised it also doesn't get used, and clang doesn't complain, so I think this is just OpenBSD's old gcc being silly but could it be initialised to make it happy?
diff --git a/src/or/hs_descriptor.c b/src/or/hs_descriptor.c
index 7c5d204..bc72034 100644
--- a/src/or/hs_descriptor.c
+++ b/src/or/hs_descriptor.c
@@ -784,7 +784,7 @@ desc_encode_v3(const hs_descriptor_t *desc, char **encoded_out)
/* Build the encrypted data section. */
{
- char *enc_b64_blob;
+ char *enc_b64_blob = NULL;
if (encode_encrypted_data(desc, &enc_b64_blob) < 0) {
goto err;
}
(I didn't want to make a new ticket for this but trac wouldn't let me post it on legacy/trac#18571 (moved), sorry)
Trac:
Username: rubiate