diff options
author | Rolf Eike Beer <eike@sf-mail.de> | 2013-05-21 21:33:54 (GMT) |
---|---|---|
committer | Rolf Eike Beer <eike@sf-mail.de> | 2013-05-21 21:33:54 (GMT) |
commit | f1d27bf667a8548121ed849cbb211eccf386f1bd (patch) | |
tree | f531c343231008e51e55e11794e4fe3034b8b57d /CompileFlags.cmake | |
parent | 4825d70e830395ebff09a7fba73eb6ff5661048b (diff) | |
download | CMake-f1d27bf667a8548121ed849cbb211eccf386f1bd.zip CMake-f1d27bf667a8548121ed849cbb211eccf386f1bd.tar.gz CMake-f1d27bf667a8548121ed849cbb211eccf386f1bd.tar.bz2 |
wizard: fix warnings
.../Source/cmakewizard.cxx: In member function ‘virtual void cmakewizard::AskUser(const char*, cmCacheManager::CacheIterator&)’:
.../Source/cmakewizard.cxx:31:35: warning: conversion to ‘int’ from ‘long unsigned int’ may alter its value [-Wconversion]
if(!fgets(buffer, sizeof(buffer)-1, stdin))
^
.../Source/cmakewizard.cxx: In member function ‘virtual bool cmakewizard::AskAdvanced()’:
.../Source/cmakewizard.cxx:70:35: warning: conversion to ‘int’ from ‘long unsigned int’ may alter its value [-Wconversion]
if(!fgets(buffer, sizeof(buffer)-1, stdin))
The compiler is (partly) right here: sizeof() returns a size_t, which often is
bigger as as int as it is unsigned long or something similar. Add an explicit
cast to get rid of that warning here, the buffer has a size of 4KiB, so the
value will fit into an int on all sane platforms.
Diffstat (limited to 'CompileFlags.cmake')
0 files changed, 0 insertions, 0 deletions