aboutsummaryrefslogtreecommitdiff
path: root/source/cpu_id.cc
diff options
context:
space:
mode:
authorFrank Barchard <fbarchard@google.com>2016-09-22 18:25:52 -0700
committerFrank Barchard <fbarchard@google.com>2016-09-22 18:25:52 -0700
commit34a29bf756234839c7829b0e76d6e603aaa4e5d4 (patch)
treeda775eb76d3a1fb1a35620a70aeb51e9650b1551 /source/cpu_id.cc
parentc5323b0fdc3428b9341043e8adc2c2715a227330 (diff)
downloadlibyuv-34a29bf756234839c7829b0e76d6e603aaa4e5d4.tar.gz
fix warning on visual C for mips cpu detect
follow up warning fixs cpu_id.cc(167): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data lint warning: cpu_id.cc:171: Missing space before ( in if( [whitespace/parens] [5] TBR=manojkumar.bhosale@imgtec.com BUG=libyuv:634 TEST=try bots for windows. Review URL: https://codereview.chromium.org/2365813002 .
Diffstat (limited to 'source/cpu_id.cc')
-rw-r--r--source/cpu_id.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/source/cpu_id.cc b/source/cpu_id.cc
index aaf58cf0..27e2467b 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;
}
}