[PATCH] D34166: Fix alignment complaint.

Eric Beckmann via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 13 13:37:02 PDT 2017


This revision was automatically updated to reflect the committed changes.
Closed by commit rL305320: Fix alignment complaint. (authored by ecbeckmann).

Changed prior to commit:
  https://reviews.llvm.org/D34166?vs=102394&id=102395#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D34166

Files:
  llvm/trunk/lib/Object/WindowsResource.cpp


Index: llvm/trunk/lib/Object/WindowsResource.cpp
===================================================================
--- llvm/trunk/lib/Object/WindowsResource.cpp
+++ llvm/trunk/lib/Object/WindowsResource.cpp
@@ -598,9 +598,8 @@
 
 void WindowsResourceCOFFWriter::writeStringTable() {
   // Just 4 null bytes for the string table.
-  auto COFFStringTable =
-      reinterpret_cast<uint32_t *>(BufferStart + CurrentOffset);
-  *COFFStringTable = 0;
+  auto COFFStringTable = reinterpret_cast<void *>(BufferStart + CurrentOffset);
+  memset(COFFStringTable, 0, 4);
 }
 
 void WindowsResourceCOFFWriter::writeDirectoryTree() {


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D34166.102395.patch
Type: text/x-patch
Size: 624 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170613/0dfddfb9/attachment.bin>


More information about the llvm-commits mailing list