pseudo: Fix build with gcc-14
PATCH 1/1 pseudo: Fix build with gcc-14
--- ...-Fix-build-warnings-seen-with-gcc-14.patch | 41 +++++++++++++++++++ meta/recipes-devtools/pseudo/pseudo_git.bb | 1 + 2 files changed, 42 insertions(+) create mode 100644 meta/recipes-devtools/pseudo/files/0001-pseudolog.c-Fix-build-warnings-seen-with-gcc-14.patch
meta/recipes-devtools/pseudo/files/0001-pseudolog.c-Fix-build-warnings-seen-with-gcc-14.patch new file +41 -0
@@ -0,0 +1,41 @@ +From 60af912335f9564862e9159ec21737210080e965 Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Thu, 1 Feb 2024 20:19:38 -0800 +Subject: [PATCH] pseudolog.c: Fix build warnings seen with gcc-14 + +Define _XOPEN_SOURCE or we do not get strptime() signature defined +resulting in implicit-function-declaration which is an error in gcc-14 + +Swap the parameters of calloc call to fix calloc-transposed-args warning + +pseudolog.c: In function 'plog_trait': +pseudolog.c:378:34: warning: 'calloc' sizes specified with 'sizeof' in the earlier argument and not in the later argument [-Wcalloc-transposed-args] + 378 | new_trait = calloc(sizeof(*new_trait), 1); + | ^ +pseudolog.c:378:34: note: earlier argument should specify number of elements, later size of each element + +Upstream-Status: Submitted [https://lore.kernel.org/openembedded-core/[email protected]/T/#u] +Signed-off-by: Khem Raj <[email protected]> +--- + pseudolog.c | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +--- a/pseudolog.c ++++ b/pseudolog.c +@@ -9,6 +9,7 @@ + /* We need _XOPEN_SOURCE for strptime(), but if we define that, + * we then don't get S_IFSOCK... _GNU_SOURCE turns on everything. */ + #define _DEFAULT_SOURCE ++#define _XOPEN_SOURCE + + #include <ctype.h> + #include <limits.h> +@@ -374,7 +375,7 @@ plog_trait(int opt, char *string) { + pseudo_diag("invalid empty string for -%c\n", opt); + return 0; + } +- new_trait = calloc(sizeof(*new_trait), 1); ++ new_trait = calloc(1, sizeof(*new_trait)); + if (!new_trait) { + pseudo_diag("Couldn't allocate requested trait (for -%c %s)\n", + opt, string ? string : "<nil>");
meta/recipes-devtools/pseudo/pseudo_git.bb +1 -0
@@ -4,6 +4,7 @@ SRC_URI = "git://git.yoctoproject.org/pseudo;branch=master;protocol=https \ file://0001-configure-Prune-PIE-flags.patch \ file://glibc238.patch \ file://0001-ports-linux-add-wrapper-for-statvfs64.patch \ + file://0001-pseudolog.c-Fix-build-warnings-seen-with-gcc-14.patch \ file://fallback-passwd \ file://fallback-group \ "
Signature · 1 line
2.43.0
Patchtest results for [PATCH] pseudo: Fix build with gcc-14
Thank you for your submission. Patchtest identified one or more issues with the patch. Please see the log below for more information:
---
Testing patch /home/patchtest/share/mboxes/pseudo-Fix-build-with-gcc-14.patch
FAIL: test commit message presence: Please include a commit message on your patch explaining the change (test_mbox.TestMbox.test_commit_message_presence)
PASS: test CVE check ignore (test_metadata.TestMetadata.test_cve_check_ignore)
PASS: test CVE tag format (test_patch.TestPatch.test_cve_tag_format)
PASS: test Signed-off-by presence (test_mbox.TestMbox.test_signed_off_by_presence)
PASS: test Signed-off-by presence (test_patch.TestPatch.test_signed_off_by_presence)
PASS: test Upstream-Status presence (test_patch.TestPatch.test_upstream_status_presence_format)
PASS: test author valid (test_mbox.TestMbox.test_author_valid)
PASS: test lic files chksum modified not mentioned (test_metadata.TestMetadata.test_lic_files_chksum_modified_not_mentioned)
PASS: test max line length (test_metadata.TestMetadata.test_max_line_length)
PASS: test mbox format (test_mbox.TestMbox.test_mbox_format)
PASS: test non-AUH upgrade (test_mbox.TestMbox.test_non_auh_upgrade)
PASS: test shortlog format (test_mbox.TestMbox.test_shortlog_format)
PASS: test shortlog length (test_mbox.TestMbox.test_shortlog_length)
PASS: test target mailing list (test_mbox.TestMbox.test_target_mailing_list)
SKIP: pretest pylint: No python related patches, skipping test (test_python_pylint.PyLint.pretest_pylint)
SKIP: pretest src uri left files: Patch cannot be merged (test_metadata.TestMetadata.pretest_src_uri_left_files)
SKIP: test bugzilla entry format: No bug ID found (test_mbox.TestMbox.test_bugzilla_entry_format)
SKIP: test lic files chksum presence: No added recipes, skipping test (test_metadata.TestMetadata.test_lic_files_chksum_presence)
SKIP: test license presence: No added recipes, skipping test (test_metadata.TestMetadata.test_license_presence)
SKIP: test pylint: No python related patches, skipping test (test_python_pylint.PyLint.test_pylint)
SKIP: test series merge on head: Merge test is disabled for now (test_mbox.TestMbox.test_series_merge_on_head)
SKIP: test src uri left files: Patch cannot be merged (test_metadata.TestMetadata.test_src_uri_left_files)
SKIP: test summary presence: No added recipes, skipping test (test_metadata.TestMetadata.test_summary_presence)
---
Please address the issues identified and
submit a new revision of the patch, or alternatively, reply to this email with an explanation of why the patch should be accepted. If you believe these results are due to an error in patchtest, please submit a bug at https://bugzilla.yoctoproject.org/ (use the 'Patchtest' category under 'Yocto Project Subprojects'). For more information on specific failures, see: https://wiki.yoctoproject.org/wiki/Patchtest. Thank you!