Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(254)

Unified Diff: source/cpu_id.cc

Issue 2365813002: fix warning on visual C for mips cpu detect (Closed)
Patch Set: fix warning on visual C for mips cpu detect Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « libyuv_test.gyp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: source/cpu_id.cc
diff --git a/source/cpu_id.cc b/source/cpu_id.cc
index aaf58cf02adce860281a9256a5d510f3b7623162..27e2467b020a326be1f919d3d00067388183e896 100644
--- a/source/cpu_id.cc
+++ b/source/cpu_id.cc
@@ -164,14 +164,14 @@ int ArmCpuCaps(const char* cpuinfo_name) {
LIBYUV_API SAFEBUFFERS
int MipsCpuCaps(const char* cpuinfo_name, const char ase[]) {
char cpuinfo_line[512];
- int len = strlen(ase);
+ int len = (int)strlen(ase);
FILE* f = fopen(cpuinfo_name, "r");
if (!f) {
// ase enabled if /proc/cpuinfo is unavailable.
- if(strcmp(ase, " msa") == 0) {
+ if (strcmp(ase, " msa") == 0) {
return kCpuHasMSA;
}
- if(strcmp(ase, " dspr2") == 0) {
+ if (strcmp(ase, " dspr2") == 0) {
return kCpuHasDSPR2;
}
}
@@ -180,10 +180,10 @@ int MipsCpuCaps(const char* cpuinfo_name, const char ase[]) {
char* p = strstr(cpuinfo_line, ase);
if (p && (p[len] == ' ' || p[len] == '\n')) {
fclose(f);
- if(strcmp(ase, " msa") == 0) {
+ if (strcmp(ase, " msa") == 0) {
return kCpuHasMSA;
}
- if(strcmp(ase, " dspr2") == 0) {
+ if (strcmp(ase, " dspr2") == 0) {
return kCpuHasDSPR2;
}
}
« no previous file with comments | « libyuv_test.gyp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698