all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
blob 3df66d3f5c51bb1ed6417188e76510888c6104b3 3619 bytes (raw)
name: gnu/packages/patches/efivar-211.patch 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
 
From 15622b7e5761f3dde3f0e42081380b2b41639a48 Mon Sep 17 00:00:00 2001
From: itd0 <69421122+itd0@users.noreply.github.com>
Date: Mon, 4 Apr 2022 19:59:58 +0200
Subject: [PATCH] Avoid format error on i686

On i686 definition of off_t and ssize_t differ.  Update format length
modifiers as needed to avoid format errors with GCC.

Signed-off-by: itd0 <69421122+itd0@users.noreply.github.com>
---
 src/esl-iter.c   | 18 +++++++++---------
 src/secdb-dump.c |  2 +-
 2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/src/esl-iter.c b/src/esl-iter.c
index 26b5cb5e..4a1938ad 100644
--- a/src/esl-iter.c
+++ b/src/esl-iter.c
@@ -308,13 +308,13 @@ esl_list_iter_next_with_size_correction(esl_list_iter *iter, efi_guid_t *type,
 		return -1;
 	}
 	if (iter->offset < 0) {
-		efi_error("iter->offset (%zd) < 0", iter->offset);
+		efi_error("iter->offset (%jd) < 0", (intmax_t)iter->offset);
 		errno = EINVAL;
 		return -1;
 	}
 	if ((uint32_t)iter->offset >= iter->len) {
-		efi_error("iter->offset (%zd) >= iter->len (%zd)",
-			  iter->offset, iter->len);
+		efi_error("iter->offset (%jd) >= iter->len (%zd)",
+			  (intmax_t)iter->offset, iter->len);
 		errno = EINVAL;
 		return -1;
 	}
@@ -335,9 +335,9 @@ esl_list_iter_next_with_size_correction(esl_list_iter *iter, efi_guid_t *type,
 			      iter->len - iter->offset, iter->len - iter->offset,
 			      iter->esl->signature_list_size, iter->esl->signature_list_size);
 			if (correct_size && (iter->len - iter->offset) > 0) {
-				warnx("correcting ESL size from %d to %zd at %lx",
+				warnx("correcting ESL size from %d to %jd at %lx",
 				      iter->esl->signature_list_size,
-				      iter->len - iter->offset, iter->offset);
+				      (intmax_t)(iter->len - iter->offset), iter->offset);
 				debug("correcting ESL size from %d to %zd at %lx",
 				      iter->esl->signature_list_size,
 				      iter->len - iter->offset, iter->offset);
@@ -360,9 +360,9 @@ esl_list_iter_next_with_size_correction(esl_list_iter *iter, efi_guid_t *type,
 		if (iter->len - iter->offset < iter->esl->signature_list_size) {
 			debug("EFI_SIGNATURE_LIST is malformed");
 			if (correct_size && (iter->len - iter->offset) > 0) {
-				warnx("correcting ESL size from %d to %zd at 0x%lx",
+				warnx("correcting ESL size from %d to %jd at 0x%lx",
 				      iter->esl->signature_list_size,
-				      iter->len - iter->offset, iter->offset);
+				      (intmax_t)(iter->len - iter->offset), iter->offset);
 				debug("correcting ESL size from %d to %zd at 0x%lx",
 				      iter->esl->signature_list_size,
 				      iter->len - iter->offset, iter->offset);
@@ -411,9 +411,9 @@ esl_list_iter_next_with_size_correction(esl_list_iter *iter, efi_guid_t *type,
 	if (iter->esl->signature_list_size > iter->len - iter->offset) {
 		debug("EFI_SIGNATURE_LIST is malformed");
 		if (correct_size && (iter->len - iter->offset) > 0) {
-			warnx("correcting ESL size from %d to %zd at 0x%lx",
+			warnx("correcting ESL size from %d to %jd at 0x%lx",
 			      iter->esl->signature_list_size,
-			      iter->len - iter->offset, iter->offset);
+			      (intmax_t)(iter->len - iter->offset), iter->offset);
 			debug("correcting ESL size from %d to %zd at 0x%lx",
 			      iter->esl->signature_list_size,
 			      iter->len - iter->offset, iter->offset);
diff --git a/src/secdb-dump.c b/src/secdb-dump.c
index 02fb915b..17f64411 100644
--- a/src/secdb-dump.c
+++ b/src/secdb-dump.c
@@ -248,7 +248,7 @@ secdb_dump(efi_secdb_t *secdb, bool annotations)
 		esln += 1;
 	}
 	secdb_dump_finish();
-	printf("%08lx\n", offset);
+	printf("%08zx\n", offset);
 
 	fflush(stdout);
 }

debug log:

solving 3df66d3f5c ...
found 3df66d3f5c in https://yhetil.org/guix/87lewf7c5w.fsf@localhost/

applying [1/1] https://yhetil.org/guix/87lewf7c5w.fsf@localhost/
diff --git a/gnu/packages/patches/efivar-211.patch b/gnu/packages/patches/efivar-211.patch
new file mode 100644
index 0000000000..3df66d3f5c

1:26: space before tab in indent.
 		return -1;
1:27: space before tab in indent.
 	}
1:28: space before tab in indent.
 	if (iter->offset < 0) {
1:31: space before tab in indent.
 		errno = EINVAL;
1:32: space before tab in indent.
 		return -1;
Checking patch gnu/packages/patches/efivar-211.patch...
Applied patch gnu/packages/patches/efivar-211.patch cleanly.
warning: squelched 31 whitespace errors
warning: 36 lines add whitespace errors.

index at:
100644 3df66d3f5c51bb1ed6417188e76510888c6104b3	gnu/packages/patches/efivar-211.patch

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.