Browse Source

Clean up some C-Style casts

Fix issues diagnosed by clang-tidy [google-readability-casting]

Signed-off-by: Matthias Maennich <[email protected]>
Matthias Maennich 8 years ago
parent
commit
b128f8c5bc
2 changed files with 2 additions and 2 deletions
  1. 1 1
      Source/CPack/cmCPackDragNDropGenerator.cxx
  2. 1 1
      Source/cmSystemTools.cxx

+ 1 - 1
Source/CPack/cmCPackDragNDropGenerator.cxx

@@ -561,7 +561,7 @@ int cmCPackDragNDropGenerator::CreateDMG(const std::string& src_dir,
           cmCPackLogger(cmCPackLog::LOG_ERROR, languages[i]
                           << " is not a recognized language" << std::endl);
         }
-        char* iso_language_cstr = (char*)malloc(65);
+        char* iso_language_cstr = static_cast<char*>(malloc(65));
         CFStringGetCString(iso_language, iso_language_cstr, 64,
                            kCFStringEncodingMacRoman);
         LangCode lang = 0;

+ 1 - 1
Source/cmSystemTools.cxx

@@ -2065,7 +2065,7 @@ void cmSystemTools::FindCMakeResources(const char* argv0)
 #undef CM_EXE_PATH_LOCAL_SIZE
   char* exe_path = exe_path_local;
   if (_NSGetExecutablePath(exe_path, &exe_path_size) < 0) {
-    exe_path = (char*)malloc(exe_path_size);
+    exe_path = static_cast<char*>(malloc(exe_path_size));
     _NSGetExecutablePath(exe_path, &exe_path_size);
   }
   exe_dir =