[llvm] r188259 - GCC warns about removing const with a c-style cast.

Benjamin Kramer benny.kra at googlemail.com
Tue Aug 13 02:57:55 PDT 2013


Author: d0k
Date: Tue Aug 13 04:57:55 2013
New Revision: 188259

URL: http://llvm.org/viewvc/llvm-project?rev=188259&view=rev
Log:
GCC warns about removing const with a c-style cast.

Modified:
    llvm/trunk/lib/Support/Unix/Process.inc

Modified: llvm/trunk/lib/Support/Unix/Process.inc
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Unix/Process.inc?rev=188259&r1=188258&r2=188259&view=diff
==============================================================================
--- llvm/trunk/lib/Support/Unix/Process.inc (original)
+++ llvm/trunk/lib/Support/Unix/Process.inc Tue Aug 13 04:57:55 2013
@@ -280,7 +280,7 @@ static bool terminalHasColors(int fd) {
   //
   // The 'tigetnum' routine returns -2 or -1 on errors, and might return 0 if
   // the terminfo says that no colors are supported.
-  if (tigetnum((char *)"colors") > 0)
+  if (tigetnum(const_cast<char *>("colors")) > 0)
     return true;
 #endif
 





More information about the llvm-commits mailing list