[all-commits] [llvm/llvm-project] 146f48: [ObjCopy] Fix type mismatch in writeCodeSignatureD...

Joshua Root via All-commits all-commits at lists.llvm.org
Fri Jun 24 09:26:20 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 146f486ba337299b88df303a6f1cf99f60df03cc
      https://github.com/llvm/llvm-project/commit/146f486ba337299b88df303a6f1cf99f60df03cc
  Author: Joshua Root <jmr at macports.org>
  Date:   2022-06-24 (Fri, 24 Jun 2022)

  Changed paths:
    M llvm/lib/ObjCopy/MachO/MachOWriter.cpp

  Log Message:
  -----------
  [ObjCopy] Fix type mismatch in writeCodeSignatureData()

The result of pointer subtraction is of type ptrdiff_t, which is not necessarily the same underlying type as ssize_t. This can lead to a compilation error since std::min requires both parameters to be the same type.

Fixes: https://github.com/llvm/llvm-project/issues/54846

Reviewed By: alexander-shaposhnikov, drodriguez, jhenderson

Differential Revision: https://reviews.llvm.org/D128117




More information about the All-commits mailing list