summaryrefslogtreecommitdiffstats
path: root/Source/kwsys/SystemInformation.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2013-10-08 13:53:13 (GMT)
committerBrad King <brad.king@kitware.com>2013-10-08 13:53:13 (GMT)
commitf59693b971819c0442657ed025ff009da6217103 (patch)
treeb5598a22d07e4afdc66e9c5d9b71e52826c11f70 /Source/kwsys/SystemInformation.cxx
parent4340507207830c5d82ca59b2e82cddf6dbf8f36b (diff)
parent1a39f857f705604818b81ed38a3d7de2d1b66fa6 (diff)
downloadCMake-f59693b971819c0442657ed025ff009da6217103.zip
CMake-f59693b971819c0442657ed025ff009da6217103.tar.gz
CMake-f59693b971819c0442657ed025ff009da6217103.tar.bz2
Merge branch 'upstream-kwsys' into update-kwsys
Diffstat (limited to 'Source/kwsys/SystemInformation.cxx')
-rw-r--r--Source/kwsys/SystemInformation.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/Source/kwsys/SystemInformation.cxx b/Source/kwsys/SystemInformation.cxx
index beefd7d..7c31f3a 100644
--- a/Source/kwsys/SystemInformation.cxx
+++ b/Source/kwsys/SystemInformation.cxx
@@ -1734,12 +1734,12 @@ int SystemInformationImplementation::GetFullyQualifiedDomainName(
{
char host[NI_MAXHOST]={'\0'};
- socklen_t addrlen
+ const size_t addrlen
= (fam==AF_INET?sizeof(struct sockaddr_in):sizeof(struct sockaddr_in6));
ierr=getnameinfo(
ifa->ifa_addr,
- addrlen,
+ static_cast<socklen_t>(addrlen),
host,
NI_MAXHOST,
NULL,
@@ -3836,7 +3836,8 @@ bool SystemInformationImplementation::QueryLinuxMemory()
unsigned long temp;
unsigned long cachedMem;
unsigned long buffersMem;
- char *r=fgets(buffer, sizeof(buffer), fd); // Skip "total: used:..."
+ // Skip "total: used:..."
+ char *r=fgets(buffer, static_cast<int>(sizeof(buffer)), fd);
int status=0;
if(r==buffer)
{