Skip to content

[BUG] v1.9.5: src/string_util.cc:158:34: error: format string is not a string literal [-Werror,-Wformat-nonliteral] #2125

@sergio-nsk

Description

@sergio-nsk

When building with LLVM clang on Windows

src/string_util.cc:158:34: error: format string is not a string literal [-Werror,-Wformat-nonliteral]
  158 |   std::string tmp = StrFormatImp(format, args);
      |                                  ^~~~~~
1 error generated.

System
Which OS, compiler, and compiler version are you using:

  • OS: Windows 10
  • Compiler and version:
clang version 21.1.4
Target: x86_64-pc-windows-msvc
Thread model: posix
InstalledDir: C:\Program Files\LLVM\bin 

To reproduce
Steps to reproduce the behavior:

  1. Install LLVM
  2. sync to the tag v1.9.5
  3. cmake -S. -Bout/llvm -GNinja, it will select LLVM clang
  4. cmake --build out/llvm
  5. See errors

Expected behavior
Build successfully.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions