Skip to content

-Wunused-but-set-global in scripts/dtc/dtc-lexer.l #2153

@nathanchance

Description

@nathanchance

After llvm/llvm-project@fd11cf4 (llvm/llvm-project@fd11cf4 split the warning out from -Wunused-but-set-variable into -Wunused-but-set-global):

scripts/dtc/dtc-lexer.lex.c:641:12: error: variable 'dts_version' set but not used [-Werror,-Wunused-but-set-global]
  641 | static int dts_version = 1;
      |            ^

This one is unfortunate because dtc is a vendored project in the kernel. I submitted the fix against upstream dtc:

https://lore.kernel.org/20260325-dtc-lexer-remove-dts_version-v1-1-0b5d64903bbb@kernel.org/

Once that is merged in dtc.git upstream, I will ask Rob to cherry-pick it into the kernel or just sync with dtc (hopefully the former so that it is easy to backport to stable).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions