[PATCH] D118004: [hmaptool] Fix dumping

Shoaib Meenai via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Jan 23 12:54:34 PST 2022


smeenai created this revision.
smeenai added a reviewer: bruno.
smeenai requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

It was complaining about too many values to unpack, since our struct
unpack format string specified six members, but we only had five
variables to unpack to. The sixth value is the max value length, but
it's not used in dumping, so we can ignore it.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D118004

Files:
  clang/utils/hmaptool/hmaptool


Index: clang/utils/hmaptool/hmaptool
===================================================================
--- clang/utils/hmaptool/hmaptool
+++ clang/utils/hmaptool/hmaptool
@@ -44,7 +44,7 @@
                         path,))
 
             (version, reserved, strtable_offset, num_entries,
-             num_buckets) = struct.unpack(header_fmt, data)
+             num_buckets, _) = struct.unpack(header_fmt, data)
 
             if version != 1:
                 raise SystemExit("error: %s: unknown headermap version: %r" % (


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D118004.402366.patch
Type: text/x-patch
Size: 527 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220123/b8003403/attachment.bin>


More information about the cfe-commits mailing list