From 34377bafb938e9d83448fa789ef505bc9171f6d1 Mon Sep 17 00:00:00 2001 From: Johannes Roth Date: Mon, 25 Mar 2024 10:15:13 +0100 Subject: [PATCH] fix some warnings --- src/librepgp/stream-packet.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/librepgp/stream-packet.cpp b/src/librepgp/stream-packet.cpp index 4ad28dfe01..c84a64c27e 100644 --- a/src/librepgp/stream-packet.cpp +++ b/src/librepgp/stream-packet.cpp @@ -1134,7 +1134,7 @@ pgp_pk_sesskey_t::parse(pgp_source_t &src) return RNP_ERROR_BAD_FORMAT; } fp.length = fp_len; - if (fp.length && (fp.length != fp_and_key_ver_len - 1)) { + if (fp.length && (fp.length != (unsigned)(fp_and_key_ver_len - 1))) { RNP_LOG("size mismatch (fingerprint size and fp+key version length field)"); return RNP_ERROR_BAD_FORMAT; } @@ -1245,7 +1245,7 @@ pgp_pk_sesskey_t::parse_material(pgp_encrypted_material_t &material) if ((version == PGP_PKSK_V3) && !do_encrypt_pkesk_v3_alg_id(alg)) { if (!pkt.get(bt)) { RNP_LOG("failed to get salg"); - return RNP_ERROR_BAD_FORMAT; + return false; } enc_sesskey_len -= 1; salg = (pgp_symm_alg_t) bt; @@ -1286,7 +1286,7 @@ pgp_pk_sesskey_t::parse_material(pgp_encrypted_material_t &material) if ((version == PGP_PKSK_V3) && !do_encrypt_pkesk_v3_alg_id(alg)) { if (!pkt.get(bt)) { RNP_LOG("failed to get salg"); - return RNP_ERROR_BAD_FORMAT; + return false; } salg = (pgp_symm_alg_t) bt; wrapped_key_len--;