[llvm] 0fa1ee8 - [DebugInfo] Fix a warning

Kazu Hirata via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 6 19:28:41 PST 2023


Author: Kazu Hirata
Date: 2023-03-06T19:28:35-08:00
New Revision: 0fa1ee8f1c311a7740238d226e4a697708b5c338

URL: https://github.com/llvm/llvm-project/commit/0fa1ee8f1c311a7740238d226e4a697708b5c338
DIFF: https://github.com/llvm/llvm-project/commit/0fa1ee8f1c311a7740238d226e4a697708b5c338.diff

LOG: [DebugInfo] Fix a warning

This patch fixes:

  llvm/lib/DebugInfo/GSYM/GsymCreator.cpp:117:18: error: unused
  variable 'MaxAddressOffset' [-Werror,-Wunused-variable]

Added: 
    

Modified: 
    llvm/lib/DebugInfo/GSYM/GsymCreator.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/DebugInfo/GSYM/GsymCreator.cpp b/llvm/lib/DebugInfo/GSYM/GsymCreator.cpp
index 991c609b2570..60b6dbc6a12d 100644
--- a/llvm/lib/DebugInfo/GSYM/GsymCreator.cpp
+++ b/llvm/lib/DebugInfo/GSYM/GsymCreator.cpp
@@ -124,6 +124,7 @@ llvm::Error GsymCreator::encode(FileWriter &O) const {
     // introduced when the code changes that can cause problems here so it is
     // good to catch this during testing.
     assert(AddrOffset <= MaxAddressOffset);
+    (void)MaxAddressOffset;
     switch (Hdr.AddrOffSize) {
     case 1:
       O.writeU8(static_cast<uint8_t>(AddrOffset));


        


More information about the llvm-commits mailing list