Fix MSVC warnings.
This commit is contained in:
@@ -880,7 +880,7 @@ lAllDivBaseEqual(llvm::Value *val, int64_t baseValue, int vectorLength,
|
|||||||
// the addConstants[], mod baseValue. If we round that up to the
|
// the addConstants[], mod baseValue. If we round that up to the
|
||||||
// next power of 2, we'll have a value that will be no greater than
|
// next power of 2, we'll have a value that will be no greater than
|
||||||
// baseValue and sometimes less.
|
// baseValue and sometimes less.
|
||||||
int maxMod = addConstants[0] % baseValue;
|
int maxMod = int(addConstants[0] % baseValue);
|
||||||
for (int i = 1; i < vectorLength; ++i)
|
for (int i = 1; i < vectorLength; ++i)
|
||||||
maxMod = std::max(maxMod, int(addConstants[i] % baseValue));
|
maxMod = std::max(maxMod, int(addConstants[i] % baseValue));
|
||||||
int requiredAlignment = lRoundUpPow2(maxMod);
|
int requiredAlignment = lRoundUpPow2(maxMod);
|
||||||
|
|||||||
2
parse.yy
2
parse.yy
@@ -549,7 +549,7 @@ rate_qualified_type_specifier
|
|||||||
if ($2 == NULL)
|
if ($2 == NULL)
|
||||||
$$ = NULL;
|
$$ = NULL;
|
||||||
else {
|
else {
|
||||||
int soaWidth = $1;
|
int soaWidth = (int)$1;
|
||||||
const StructType *st = dynamic_cast<const StructType *>($2);
|
const StructType *st = dynamic_cast<const StructType *>($2);
|
||||||
if (st == NULL) {
|
if (st == NULL) {
|
||||||
Error(@1, "\"soa\" qualifier is illegal with non-struct type \"%s\".",
|
Error(@1, "\"soa\" qualifier is illegal with non-struct type \"%s\".",
|
||||||
|
|||||||
12
util.cpp
12
util.cpp
@@ -101,7 +101,7 @@ lHaveANSIColors() {
|
|||||||
static const char *
|
static const char *
|
||||||
lStartBold() {
|
lStartBold() {
|
||||||
if (lHaveANSIColors())
|
if (lHaveANSIColors())
|
||||||
return "\e[1m";
|
return "\033[1m";
|
||||||
else
|
else
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
@@ -110,7 +110,7 @@ lStartBold() {
|
|||||||
static const char *
|
static const char *
|
||||||
lStartRed() {
|
lStartRed() {
|
||||||
if (lHaveANSIColors())
|
if (lHaveANSIColors())
|
||||||
return "\e[31m";
|
return "\033[31m";
|
||||||
else
|
else
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
@@ -119,7 +119,7 @@ lStartRed() {
|
|||||||
static const char *
|
static const char *
|
||||||
lStartBlue() {
|
lStartBlue() {
|
||||||
if (lHaveANSIColors())
|
if (lHaveANSIColors())
|
||||||
return "\e[34m";
|
return "\033[34m";
|
||||||
else
|
else
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
@@ -128,7 +128,7 @@ lStartBlue() {
|
|||||||
static const char *
|
static const char *
|
||||||
lResetColor() {
|
lResetColor() {
|
||||||
if (lHaveANSIColors())
|
if (lHaveANSIColors())
|
||||||
return "\e[0m";
|
return "\033[0m";
|
||||||
else
|
else
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
@@ -192,7 +192,7 @@ static int
|
|||||||
lFindIndent(int numColons, const char *buf) {
|
lFindIndent(int numColons, const char *buf) {
|
||||||
int indent = 0;
|
int indent = 0;
|
||||||
while (*buf != '\0') {
|
while (*buf != '\0') {
|
||||||
if (*buf == '\e') {
|
if (*buf == '\033') {
|
||||||
while (*buf != '\0' && *buf != 'm')
|
while (*buf != '\0' && *buf != 'm')
|
||||||
++buf;
|
++buf;
|
||||||
if (*buf == 'm')
|
if (*buf == 'm')
|
||||||
@@ -229,7 +229,7 @@ lPrintWithWordBreaks(const char *buf, int indent, int columnWidth, FILE *out) {
|
|||||||
|
|
||||||
const char *msgPos = buf;
|
const char *msgPos = buf;
|
||||||
while (true) {
|
while (true) {
|
||||||
if (*msgPos == '\e') {
|
if (*msgPos == '\033') {
|
||||||
// handle ANSI color escape: copy it to the output buffer
|
// handle ANSI color escape: copy it to the output buffer
|
||||||
// without charging for the characters it uses
|
// without charging for the characters it uses
|
||||||
do {
|
do {
|
||||||
|
|||||||
Reference in New Issue
Block a user