cmake analyzer and strict modes

This commit is contained in:
2026-08-16 22:08:47 +02:00
parent 914fa6e5a7
commit af888258f4
4 changed files with 147 additions and 36 deletions
+4 -1
View File
@@ -767,7 +767,7 @@ static bool VerifyChainFully(blockchain_t* chain) {
}
// Use when error
void KillEverythingAndExit(net_node_t* node, blockchain_t* chain) {
[[noreturn]] void KillEverythingAndExit(net_node_t* node, blockchain_t* chain) {
Node_Destroy(node);
currentChain = NULL;
Chain_Destroy(chain);
@@ -918,18 +918,21 @@ int main(int argc, char* argv[]) {
if (read != 32) {
fprintf(stderr, "failed to read wallet file\n");
fclose(walletFile);
KillEverythingAndExit(node, chain);
}
read = fread(minerCompressedPubkey, 1, 33, walletFile);
if (read != 33) {
fprintf(stderr, "failed to read wallet file\n");
fclose(walletFile);
KillEverythingAndExit(node, chain);
}
read = fread(minerAddress, 1, 32, walletFile);
if (read != 32) {
fprintf(stderr, "failed to read wallet file\n");
fclose(walletFile);
KillEverythingAndExit(node, chain);
}
fclose(walletFile);