Skip to content
Snippets Groups Projects
Commit dbc8fa1b authored by Rolf Eike Beer's avatar Rolf Eike Beer
Browse files

SystemInformation: fix truncation warnings

Fixes the following truncation warnings from g++ 4.8:

kwsys/SystemInformation.cxx: In member function 'int cmsys::SystemInformationImplementation::GetFullyQualifiedDomainName(std::string&)':
kwsys/SystemInformation.cxx:1738:31: warning: conversion to 'socklen_t {aka unsigned int}' from 'long unsigned int' may alter its value [-Wconversion]
         = (fam==AF_INET?sizeof(struct sockaddr_in):sizeof(struct sockaddr_in6));
                               ^
kwsys/SystemInformation.cxx:1738:58: warning: conversion to 'socklen_t {aka unsigned int}' from 'long unsigned int' may alter its value [-Wconversion]
         = (fam==AF_INET?sizeof(struct sockaddr_in):sizeof(struct sockaddr_in6));
                                                          ^
kwsys/SystemInformation.cxx: In member function 'bool cmsys::SystemInformationImplementation::QueryLinuxMemory()':
kwsys/SystemInformation.cxx:3839:33: warning: conversion to 'int' from 'long unsigned int' may alter its value [-Wconversion]
     char *r=fgets(buffer, sizeof(buffer), fd); // Skip "total: used:..."
                                 ^

Change-Id: I1016a7e31325ee550322dde7a21ffc92d6ca49dc
parent deec6b8a
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment