From: Chad Rosier Date: Thu, 18 Aug 2011 01:23:31 +0000 (+0000) Subject: Fix off by one. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f01f8474e2ae14bba4855f20dcc59f3a8e23d730;p=clang Fix off by one. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137915 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp index fa0db2cd51..36affd6494 100644 --- a/lib/Driver/Tools.cpp +++ b/lib/Driver/Tools.cpp @@ -2451,7 +2451,7 @@ void darwin::CC1::RemoveCC1UnsupportedArgs(ArgStringList &CmdArgs) const { const char *Option = *it; // We only remove warning options. - if (!strncmp(Option, "-W", 3)) { + if (!strncmp(Option, "-W", 2)) { ++it; continue; }