]> granicus.if.org Git - clang/commitdiff
Fix Casting
authorDavid Greene <greened@obbligato.org>
Tue, 15 Jan 2013 22:09:43 +0000 (22:09 +0000)
committerDavid Greene <greened@obbligato.org>
Tue, 15 Jan 2013 22:09:43 +0000 (22:09 +0000)
Make the const_cast explicit to silence a compiler warning.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172560 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Serialization/ASTWriter.cpp

index d4b0367cac642ab465834747042b2d8c02448a38..af736a4048a87e2512ec585407f6fe633d7376eb 100644 (file)
@@ -1552,7 +1552,7 @@ void ASTWriter::WriteHeaderSearch(const HeaderSearch &HS, StringRef isysroot) {
   
   // Free all of the strings we had to duplicate.
   for (unsigned I = 0, N = SavedStrings.size(); I != N; ++I)
-    free((void*)SavedStrings[I]);
+    free(const_cast<char *>(SavedStrings[I]));
 }
 
 /// \brief Writes the block containing the serialized form of the