You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
1.4 KiB
39 lines
1.4 KiB
From 8f9b642f14c5de5303326a5b32f6d267ed7349b6 Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
|
|
Date: Thu, 21 Oct 2021 15:32:08 +0200
|
|
Subject: [PATCH] Fix formatting a pointer difference
|
|
MIME-Version: 1.0
|
|
Content-Type: text/plain; charset=UTF-8
|
|
Content-Transfer-Encoding: 8bit
|
|
|
|
GCC 11 warned:
|
|
|
|
XS.xs: In function 'decode_cbor':
|
|
XS.xs:1478:14: warning: format '%d' expects argument of type 'int', but argument 3 has type 'long int' [-Wformat=]
|
|
1478 | croak ("%s, at offset %d (octet 0x%02x)", dec.err, dec.cur - (U8 *)data, (int)(uint8_t)*dec.cur);
|
|
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~
|
|
| |
|
|
| long int
|
|
|
|
Signed-off-by: Petr Písař <ppisar@redhat.com>
|
|
---
|
|
XS.xs | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/XS.xs b/XS.xs
|
|
index f4e2b4c..bfc7178 100644
|
|
--- a/XS.xs
|
|
+++ b/XS.xs
|
|
@@ -1475,7 +1475,7 @@ decode_cbor (SV *string, CBOR *cbor, char **offset_return)
|
|
if (dec.err_sv)
|
|
sv_2mortal (dec.err_sv);
|
|
|
|
- croak ("%s, at offset %d (octet 0x%02x)", dec.err, dec.cur - (U8 *)data, (int)(uint8_t)*dec.cur);
|
|
+ croak ("%s, at offset %td (octet 0x%02x)", dec.err, dec.cur - (U8 *)data, (int)(uint8_t)*dec.cur);
|
|
}
|
|
|
|
sv = sv_2mortal (sv);
|
|
--
|
|
2.31.1
|
|
|