From 825e063a78bee82fd695e9ef170bf6db0aaa30c0 Mon Sep 17 00:00:00 2001 From: "ajm@google.com" Date: Sat, 16 Jul 2011 01:04:52 +0000 Subject: [PATCH] Fixing some warnings in system_wrappers. Review URL: http://webrtc-codereview.appspot.com/79001 git-svn-id: http://webrtc.googlecode.com/svn/trunk@220 4adac7df-926f-26a2-2b94-8c16560cd09d --- src/system_wrappers/source/cpu_linux.cc | 5 ++++- src/system_wrappers/source/map.cc | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/system_wrappers/source/cpu_linux.cc b/src/system_wrappers/source/cpu_linux.cc index eff9704db9..2e095002b1 100644 --- a/src/system_wrappers/source/cpu_linux.cc +++ b/src/system_wrappers/source/cpu_linux.cc @@ -153,7 +153,10 @@ int CpuLinux::GetNumCores() } // Skip first line char line[100]; - char* dummy = fgets(line, 100, fp); + if (!fgets(line, 100, fp)) + { + return -1; + } int numCores = -1; char firstWord[100]; do diff --git a/src/system_wrappers/source/map.cc b/src/system_wrappers/source/map.cc index 0bff155be4..331da328b8 100644 --- a/src/system_wrappers/source/map.cc +++ b/src/system_wrappers/source/map.cc @@ -13,7 +13,7 @@ #include "trace.h" namespace webrtc { -MapItem::MapItem(int id, void* item) : item_pointer_(item), item_id_(id) +MapItem::MapItem(int id, void* item) : item_id_(id), item_pointer_(item) { }