Clang’s -Wno-unused-variable warning points out some places where the code isn’t checking function results. The following lines are putting results in variables but not doing anything with them:
int size = mbedtls_md_get_size(md_info); (keys.c:153)
int tls_rc = tls->engine->write(tls->engine, NULL, 0, buf.base, &buf.len, TLS_BUF_SZ); (tls_link.c:204)
It’s not obvious what should be done with these. In the first case is the call even necessary? In the second case it does look like the result of the write should be checked for errors, but I don’t know how.
Clang’s
-Wno-unused-variable
warning points out some places where the code isn’t checking function results. The following lines are putting results in variables but not doing anything with them:int size = mbedtls_md_get_size(md_info);
(keys.c:153)int tls_rc = tls->engine->write(tls->engine, NULL, 0, buf.base, &buf.len, TLS_BUF_SZ);
(tls_link.c:204)It’s not obvious what should be done with these. In the first case is the call even necessary? In the second case it does look like the result of the write should be checked for errors, but I don’t know how.