diff options
| -rw-r--r-- | meta/recipes-support/libgpg-error/libgpg-error/0001-Avoid-use-of-nullptr-for-an-identifier.patch | 52 | ||||
| -rw-r--r-- | meta/recipes-support/libgpg-error/libgpg-error_1.48.bb | 1 |
2 files changed, 53 insertions, 0 deletions
diff --git a/meta/recipes-support/libgpg-error/libgpg-error/0001-Avoid-use-of-nullptr-for-an-identifier.patch b/meta/recipes-support/libgpg-error/libgpg-error/0001-Avoid-use-of-nullptr-for-an-identifier.patch new file mode 100644 index 0000000000..11ab7a2a4e --- /dev/null +++ b/meta/recipes-support/libgpg-error/libgpg-error/0001-Avoid-use-of-nullptr-for-an-identifier.patch | |||
| @@ -0,0 +1,52 @@ | |||
| 1 | From d14c69a7f256a9444c5c64b808d8767e5a8ba68e Mon Sep 17 00:00:00 2001 | ||
| 2 | From: NIIBE Yutaka <gniibe@fsij.org> | ||
| 3 | Date: Wed, 23 Oct 2024 08:48:06 +0900 | ||
| 4 | Subject: [PATCH] Avoid use of 'nullptr' for an identifier. | ||
| 5 | |||
| 6 | * tests/t-printf.c (check_fprintf_sf): Use 'null_ptr' | ||
| 7 | as an identifier. | ||
| 8 | |||
| 9 | -- | ||
| 10 | |||
| 11 | GnuPG-bug-id: 7344 | ||
| 12 | Signed-off-by: NIIBE Yutaka <gniibe@fsij.org> | ||
| 13 | |||
| 14 | Upstream-Status: Backport [libgpg-error-1.51 d14c69a7f256a9444c5c64b808d8767e5a8ba68e] | ||
| 15 | Signed-off-by: Martin Jansa <martin.jansa@gmail.com> | ||
| 16 | --- | ||
| 17 | tests/t-printf.c | 8 ++++---- | ||
| 18 | 1 file changed, 4 insertions(+), 4 deletions(-) | ||
| 19 | |||
| 20 | diff --git a/tests/t-printf.c b/tests/t-printf.c | ||
| 21 | index c1ad0b0..87c201d 100644 | ||
| 22 | --- a/tests/t-printf.c | ||
| 23 | +++ b/tests/t-printf.c | ||
| 24 | @@ -449,7 +449,7 @@ string_filter (const char *string, int no, void *opaque) | ||
| 25 | static void | ||
| 26 | check_fprintf_sf (void) | ||
| 27 | { | ||
| 28 | - volatile char *nullptr = NULL; /* Avoid compiler warning. */ | ||
| 29 | + volatile char *null_ptr = NULL; /* Avoid compiler warning. */ | ||
| 30 | struct sfstate_s sfstate = {NULL}; | ||
| 31 | gpgrt_stream_t stream; | ||
| 32 | const char *expect; | ||
| 33 | @@ -461,8 +461,8 @@ check_fprintf_sf (void) | ||
| 34 | |||
| 35 | gpgrt_fprintf_sf (stream, string_filter, &sfstate, | ||
| 36 | "%s a=%d b=%s c=%d d=%.8s null=%s\n", | ||
| 37 | - nullptr, 1, "foo\x01 bar", 2, | ||
| 38 | - "a longer string", nullptr); | ||
| 39 | + null_ptr, 1, "foo\x01 bar", 2, | ||
| 40 | + "a longer string", null_ptr); | ||
| 41 | expect = "[==>Niente<==] a=1 b=foo\x01 bar c=2 d=a longer null=(null)\n"; | ||
| 42 | result = stream_to_string (stream); | ||
| 43 | if (strcmp (result, expect)) | ||
| 44 | @@ -475,7 +475,7 @@ check_fprintf_sf (void) | ||
| 45 | |||
| 46 | gpgrt_fprintf_sf (stream, string_filter, &sfstate, | ||
| 47 | "a=%d b=%s c=%d d=%.8s e=%s\n", | ||
| 48 | - 1, "foo\n bar", 2, nullptr, ""); | ||
| 49 | + 1, "foo\n bar", 2, null_ptr, ""); | ||
| 50 | expect = "a=1 b=foo\n bar c=2 d=[==>Nien e=\n"; | ||
| 51 | result = stream_to_string (stream); | ||
| 52 | if (strcmp (result, expect)) | ||
diff --git a/meta/recipes-support/libgpg-error/libgpg-error_1.48.bb b/meta/recipes-support/libgpg-error/libgpg-error_1.48.bb index 9f2b49209d..2106f3de85 100644 --- a/meta/recipes-support/libgpg-error/libgpg-error_1.48.bb +++ b/meta/recipes-support/libgpg-error/libgpg-error_1.48.bb | |||
| @@ -17,6 +17,7 @@ UPSTREAM_CHECK_URI = "https://gnupg.org/download/index.html" | |||
| 17 | SRC_URI = "${GNUPG_MIRROR}/libgpg-error/libgpg-error-${PV}.tar.bz2 \ | 17 | SRC_URI = "${GNUPG_MIRROR}/libgpg-error/libgpg-error-${PV}.tar.bz2 \ |
| 18 | file://pkgconfig.patch \ | 18 | file://pkgconfig.patch \ |
| 19 | file://0001-Do-not-fail-when-testing-config-scripts.patch \ | 19 | file://0001-Do-not-fail-when-testing-config-scripts.patch \ |
| 20 | file://0001-Avoid-use-of-nullptr-for-an-identifier.patch \ | ||
| 20 | file://run-ptest \ | 21 | file://run-ptest \ |
| 21 | " | 22 | " |
| 22 | 23 | ||
