[all-commits] [llvm/llvm-project] ea548a: [MC][ELF] Fix "enumeral and non-enumeral type in c...

nullptr-cpp via All-commits all-commits at lists.llvm.org
Tue Mar 9 19:27:38 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ea548a4e413812d4726f158f9de5604739ed8a51
      https://github.com/llvm/llvm-project/commit/ea548a4e413812d4726f158f9de5604739ed8a51
  Author: Yang Fan <nullptr.cpp at gmail.com>
  Date:   2021-03-10 (Wed, 10 Mar 2021)

  Changed paths:
    M llvm/lib/MC/ELFObjectWriter.cpp

  Log Message:
  -----------
  [MC][ELF] Fix "enumeral and non-enumeral type in conditional expression" warning (NFC)

GCC warning:
```
/llvm-project/llvm/lib/MC/ELFObjectWriter.cpp: In member function ‘void {anonymous}::ELFWriter::writeHeader(const llvm::MCAssembler&)’:
/llvm-project/llvm/lib/MC/ELFObjectWriter.cpp:421:20: warning: enumeral and non-enumeral type in conditional expression [-Wextra]
  420 |   W.OS << char(OSABI == ELF::ELFOSABI_NONE && OWriter.seenGnuAbi()
      |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  421 |                    ? ELF::ELFOSABI_GNU
      |                    ^~~~~~~~~~~~~~~~~~~
  422 |                    : OSABI);
      |                    ~~~~~~~
```




More information about the All-commits mailing list