From 7dea21fdfca78883f1d4047c9b7e141400210479 Mon Sep 17 00:00:00 2001 From: Benjamin Sigonneau Date: Tue, 30 Jul 2024 09:57:03 +0200 Subject: [PATCH] Use sprintf instead of Int64.format `Int64.format` was removed in ocaml 5, and ocaml 4.14 displays deprecation warnings. --- lib/pgp.ml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/pgp.ml b/lib/pgp.ml index 3c634a6..1a3ad5b 100644 --- a/lib/pgp.ml +++ b/lib/pgp.ml @@ -643,7 +643,7 @@ module Packet = struct | 9 -> Ok (Key_expiration_time (Cstruct.BE.get_uint32 cs 1)) | 16 -> let id = Cstruct.BE.get_uint64 cs 1 in - Ok (Issuer_id (Int64.format "%x" id)) + Ok (Issuer_id (Printf.sprintf "%Lx" id)) | 27 -> decode_uses cs | 29 -> decode_revocation_reason cs | _ -> Ok Unknown @@ -700,7 +700,7 @@ module Packet = struct let signature_type = tag_to_sigtype tag in if hash_material_len == 5 then let key_id_int = Cstruct.BE.get_uint64 packet 6 in - let key_id = Int64.format "%x" key_id_int in + let key_id = Printf.sprintf "%Lx" key_id_int in Ok {tag; version = 3; subpackets = [Issuer_id key_id]; signature_type} else Error "Bad hash material length in v3 signature packet"