Author: Michael Liao Date: 2020-12-02T10:53:59-05:00 New Revision: 21d74172dff79378c5c45ca21b7faa70df64f41a
URL: https://github.com/llvm/llvm-project/commit/21d74172dff79378c5c45ca21b7faa70df64f41a DIFF: https://github.com/llvm/llvm-project/commit/21d74172dff79378c5c45ca21b7faa70df64f41a.diff LOG: Remove `-Wunused-result` and `-Wpedantic` warnings from GCC. NFC. Added: Modified: llvm/lib/Support/ErrorHandling.cpp llvm/unittests/Frontend/OpenMPIRBuilderTest.cpp Removed: ################################################################################ diff --git a/llvm/lib/Support/ErrorHandling.cpp b/llvm/lib/Support/ErrorHandling.cpp index 23b9f962422e..ce6344284f06 100644 --- a/llvm/lib/Support/ErrorHandling.cpp +++ b/llvm/lib/Support/ErrorHandling.cpp @@ -170,9 +170,9 @@ void llvm::report_bad_alloc_error(const char *Reason, bool GenCrashDiag) { // an OOM to stderr and abort. const char *OOMMessage = "LLVM ERROR: out of memory\n"; const char *Newline = "\n"; - (void)::write(2, OOMMessage, strlen(OOMMessage)); - (void)::write(2, Reason, strlen(Reason)); - (void)::write(2, Newline, strlen(Newline)); + (void)!::write(2, OOMMessage, strlen(OOMMessage)); + (void)!::write(2, Reason, strlen(Reason)); + (void)!::write(2, Newline, strlen(Newline)); abort(); #endif } diff --git a/llvm/unittests/Frontend/OpenMPIRBuilderTest.cpp b/llvm/unittests/Frontend/OpenMPIRBuilderTest.cpp index 2d86b924e4b0..fbf6c2fe4076 100644 --- a/llvm/unittests/Frontend/OpenMPIRBuilderTest.cpp +++ b/llvm/unittests/Frontend/OpenMPIRBuilderTest.cpp @@ -77,7 +77,7 @@ static Value *findStoredValue(Value *AllocaValue) { if (!Store) return nullptr; return Store->getValueOperand(); -}; +} TEST_F(OpenMPIRBuilderTest, CreateBarrier) { OpenMPIRBuilder OMPBuilder(*M); _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits