[PATCH] D32611: Fix a few pedantic warnings.

Frederich Munch via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 27 15:23:56 PDT 2017


This revision was automatically updated to reflect the committed changes.
Closed by commit rL301595: Fix a few pedantic warnings. (authored by marsupial).

Changed prior to commit:
  https://reviews.llvm.org/D32611?vs=96961&id=97004#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D32611

Files:
  llvm/trunk/tools/llvm-pdbdump/PdbYaml.cpp
  llvm/trunk/unittests/Support/DynamicLibrary/DynamicLibraryTest.cpp


Index: llvm/trunk/unittests/Support/DynamicLibrary/DynamicLibraryTest.cpp
===================================================================
--- llvm/trunk/unittests/Support/DynamicLibrary/DynamicLibraryTest.cpp
+++ llvm/trunk/unittests/Support/DynamicLibrary/DynamicLibraryTest.cpp
@@ -23,8 +23,8 @@
 extern "C" PIPSQUEAK_EXPORT const char *TestA() { return "ProcessCall"; }
 
 std::string LibPath() {
-  std::string Path =
-      fs::getMainExecutable("DynamicLibraryTests", (void *)&TestA);
+  void *Ptr = (void*)(intptr_t)TestA;
+  std::string Path = fs::getMainExecutable("DynamicLibraryTests", Ptr);
   llvm::SmallString<256> Buf(path::parent_path(Path));
   path::append(Buf, "PipSqueak.so");
   return Buf.str();
Index: llvm/trunk/tools/llvm-pdbdump/PdbYaml.cpp
===================================================================
--- llvm/trunk/tools/llvm-pdbdump/PdbYaml.cpp
+++ llvm/trunk/tools/llvm-pdbdump/PdbYaml.cpp
@@ -311,25 +311,25 @@
             pdb::yaml::SerializationContext &Context) {
   IO.mapRequired("StartColumn", Obj.StartColumn);
   IO.mapRequired("EndColumn", Obj.EndColumn);
-};
+}
 
 void MappingContextTraits<pdb::yaml::PdbSourceLineBlock,
                           pdb::yaml::SerializationContext>::
     mapping(IO &IO, PdbSourceLineBlock &Obj,
             pdb::yaml::SerializationContext &Context) {
   IO.mapRequired("FileName", Obj.FileName);
   IO.mapRequired("Lines", Obj.Lines, Context);
   IO.mapRequired("Columns", Obj.Columns, Context);
-};
+}
 
 void MappingContextTraits<pdb::yaml::PdbSourceFileChecksumEntry,
                           pdb::yaml::SerializationContext>::
     mapping(IO &IO, PdbSourceFileChecksumEntry &Obj,
             pdb::yaml::SerializationContext &Context) {
   IO.mapRequired("FileName", Obj.FileName);
   IO.mapRequired("Kind", Obj.Kind);
   IO.mapRequired("Checksum", Obj.ChecksumBytes);
-};
+}
 
 void MappingContextTraits<pdb::yaml::PdbSourceLineInfo,
                           pdb::yaml::SerializationContext>::
@@ -340,15 +340,15 @@
   IO.mapRequired("RelocOffset", Obj.RelocOffset);
   IO.mapRequired("RelocSegment", Obj.RelocSegment);
   IO.mapRequired("LineInfo", Obj.LineInfo, Context);
-};
+}
 
 void MappingContextTraits<pdb::yaml::PdbSourceFileInfo,
                           pdb::yaml::SerializationContext>::
     mapping(IO &IO, PdbSourceFileInfo &Obj,
             pdb::yaml::SerializationContext &Context) {
   IO.mapOptionalWithContext("Lines", Obj.Lines, Context);
   IO.mapOptionalWithContext("Checksums", Obj.FileChecksums, Context);
-};
+}
 
 void MappingContextTraits<PdbTpiRecord, pdb::yaml::SerializationContext>::
     mapping(IO &IO, pdb::yaml::PdbTpiRecord &Obj,


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D32611.97004.patch
Type: text/x-patch
Size: 2669 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170427/41de836e/attachment-0001.bin>


More information about the llvm-commits mailing list