Clang warnings
Closed this issue · 2 comments
marxin commented
I've noticed the following Clang warnings:
/home/conan/w/prod-v1/BuildSingleReference/.conan/data/libe57format/3.0.2/_/_/build/502976e801cbdd00546a7463b5dcc4fd2fba2330/src/src/SourceDestBufferImpl.cpp:495:39: error: implicit conversion from 'long' to 'double' changes value from 9223372036854775807 to 9223372036854775808 [-Werror,-Wimplicit-const-int-float-conversion]
if ( doubleRawValue < INT64_MIN || INT64_MAX < doubleRawValue )
^~~~~~~~~ ~
/usr/include/stdint.h:163:22: note: expanded from macro 'INT64_MAX'
# define INT64_MAX (__INT64_C(9223372036854775807))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/stdint.h:145:24: note: expanded from macro '__INT64_C'
# define __INT64_C(c) c ## L
^~~~~~
<scratch space>:47:1: note: expanded from here
9223372036854775807L
^~~~~~~~~~~~~~~~~~~~
/home/conan/w/prod-v1/BuildSingleReference/.conan/data/libe57format/3.0.2/_/_/build/502976e801cbdd00546a7463b5dcc4fd2fba2330/src/src/SourceDestBufferImpl.cpp:206:38: error: implicit conversion from 'int' to 'float' changes value from 2147483647 to 2147483648 [-Werror,-Wimplicit-const-int-float-conversion]
if ( inValue < INT32_MIN || INT32_MAX < inValue )
^~~~~~~~~ ~
/usr/include/stdint.h:162:22: note: expanded from macro 'INT32_MAX'
# define INT32_MAX (2147483647)
^~~~~~~~~~
/home/conan/w/prod-v1/BuildSingleReference/.conan/data/libe57format/3.0.2/_/_/build/502976e801cbdd00546a7463b5dcc4fd2fba2330/src/src/SourceDestBufferImpl.cpp:944:4: note: in instantiation of function template specialization 'e57::SourceDestBufferImpl::_setNextReal<float>' requested here
_setNextReal( value );
^
/home/conan/w/prod-v1/BuildSingleReference/.conan/data/libe57format/3.0.2/_/_/build/502976e801cbdd00546a7463b5dcc4fd2fba2330/src/src/SourceDestBufferImpl.cpp:218:39: error: implicit conversion from 'unsigned int' to 'float' changes value from 4294967295 to 4294967296 [-Werror,-Wimplicit-const-int-float-conversion]
if ( inValue < UINT32_MIN || UINT32_MAX < inValue )
^~~~~~~~~~ ~
/usr/include/stdint.h:168:23: note: expanded from macro 'UINT32_MAX'
# define UINT32_MAX (4294967295U)
^~~~~~~~~~~
/home/conan/w/prod-v1/BuildSingleReference/.conan/data/libe57format/3.0.2/_/_/build/502976e801cbdd00546a7463b5dcc4fd2fba2330/src/src/SourceDestBufferImpl.cpp:230:38: error: implicit conversion from 'long' to 'float' changes value from 9223372036854775807 to 9223372036854775808 [-Werror,-Wimplicit-const-int-float-conversion]
if ( inValue < INT64_MIN || INT64_MAX < inValue )
^~~~~~~~~ ~
/usr/include/stdint.h:163:22: note: expanded from macro 'INT64_MAX'
# define INT64_MAX (__INT64_C(9223372036854775807))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/stdint.h:145:24: note: expanded from macro '__INT64_C'
# define __INT64_C(c) c ## L
^~~~~~
<scratch space>:5:1: note: expanded from here
9223372036854775807L
^~~~~~~~~~~~~~~~~~~~
/home/conan/w/prod-v1/BuildSingleReference/.conan/data/libe57format/3.0.2/_/_/build/502976e801cbdd00546a7463b5dcc4fd2fba2330/src/src/SourceDestBufferImpl.cpp:230:38: error: implicit conversion from 'long' to 'double' changes value from 9223372036854775807 to 9223372036854775808 [-Werror,-Wimplicit-const-int-float-conversion]
if ( inValue < INT64_MIN || INT64_MAX < inValue )
^~~~~~~~~ ~
/usr/include/stdint.h:163:22: note: expanded from macro 'INT64_MAX'
# define INT64_MAX (__INT64_C(9223372036854775807))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/stdint.h:145:24: note: expanded from macro '__INT64_C'
# define __INT64_C(c) c ## L
^~~~~~
<scratch space>:5:1: note: expanded from here
9223372036854775807L
^~~~~~~~~~~~~~~~~~~~
/home/conan/w/prod-v1/BuildSingleReference/.conan/data/libe57format/3.0.2/_/_/build/502976e801cbdd00546a7463b5dcc4fd2fba2330/src/src/SourceDestBufferImpl.cpp:949:4: note: in instantiation of function template specialization 'e57::SourceDestBufferImpl::_setNextReal<double>' requested here
_setNextReal( value );
asmaloney commented
What version? What OS?
marxin commented
It's Clang 13 on MacOS:
warning.txt