Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

linux-yocto: added patch to fix "maybe-uninitialized" warning with gcc 14 #13

Open
wants to merge 1 commit into
base: styhead
Choose a base branch
from

Conversation

lms-jk
Copy link

@lms-jk lms-jk commented Oct 30, 2024

Styhead added support for Ubuntu 24.10 that ships with gcc 14. This version of gcc produces an error when compiling the linux kernel:

In function 'memcpy',
    inlined from 'options__order' at parse-options.c:834:2:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:29:10: error: 'o' may be used uninitialized [-Werror=maybe-uninitialized]
   29 |   return __builtin___memcpy_chk (__dest, __src, __len,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   30 |                                  __glibc_objsize0 (__dest));
      |                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~
parse-options.c: In function 'options__order':
parse-options.c:812:30: note: 'o' was declared here
  812 |         const struct option *o, *p = opts;
      |                              ^
cc1: all warnings being treated as errors

This patch simply initializes o with NULL.

@fabioestevam
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants