[PATCH] D32611: Fix a few pedantic warnings.

Hans Wennborg via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 27 13:32:37 PDT 2017


hans added subscribers: llvm-commits, hans.
hans accepted this revision.
hans added a comment.
This revision is now accepted and ready to land.

Please always cc the mailing list.

lgtm with comment



================
Comment at: unittests/Support/DynamicLibrary/DynamicLibraryTest.cpp:26
 std::string LibPath() {
-  std::string Path =
-      fs::getMainExecutable("DynamicLibraryTests", (void *)&TestA);
+  void *Ptr = (void*) intptr_t(TestA);
+  std::string Path = fs::getMainExecutable("DynamicLibraryTests", Ptr);
----------------
The intptr_t construction looks a little odd to me like that.

I think `(void*)(intptr_t)TestA` would be nicer.


https://reviews.llvm.org/D32611





More information about the llvm-commits mailing list