lamyj / odil

Odil is a C++11 library for the DICOM standard
Other
85 stars 21 forks source link

compilation warnings #74

Closed ferdymercury closed 4 years ago

ferdymercury commented 4 years ago

There are some warnings when including odil from external projects:

In file included from /opt/odil/install/lib/CMake/Odil/../../../include/odil/DataSet.h:19,
                 from test.cpp:10:
/opt/odil/install/lib/CMake/Odil/../../../include/odil/Element.h:53:40: warning: extra ‘;’ [-Wpedantic]
     ODIL_ELEMENT_CONSTRUCTORS(Integers);
                                        ^
                                        -
/opt/odil/install/lib/CMake/Odil/../../../include/odil/Element.h:54:37: warning: extra ‘;’ [-Wpedantic]
     ODIL_ELEMENT_CONSTRUCTORS(Reals);
                                     ^
                                     -
/opt/odil/install/lib/CMake/Odil/../../../include/odil/Element.h:55:39: warning: extra ‘;’ [-Wpedantic]
     ODIL_ELEMENT_CONSTRUCTORS(Strings);
                                       ^
                                       -
/opt/odil/install/lib/CMake/Odil/../../../include/odil/Element.h:56:40: warning: extra ‘;’ [-Wpedantic]
     ODIL_ELEMENT_CONSTRUCTORS(DataSets);
                                        ^
                                        -
/opt/odil/install/lib/CMake/Odil/../../../include/odil/Element.h:57:38: warning: extra ‘;’ [-Wpedantic]
     ODIL_ELEMENT_CONSTRUCTORS(Binary);
                                      ^
                                      -
In file included from test.cpp:10:
/opt/odil/install/lib/CMake/Odil/../../../include/odil/DataSet.h:68:31: warning: extra ‘;’ [-Wpedantic]
     ODIL_DATASET_ADD(Integers);
                               ^
                               -
/opt/odil/install/lib/CMake/Odil/../../../include/odil/DataSet.h:69:28: warning: extra ‘;’ [-Wpedantic]
     ODIL_DATASET_ADD(Reals);
                            ^
                            -
/opt/odil/install/lib/CMake/Odil/../../../include/odil/DataSet.h:70:30: warning: extra ‘;’ [-Wpedantic]
     ODIL_DATASET_ADD(Strings);
                              ^
                              -
/opt/odil/install/lib/CMake/Odil/../../../include/odil/DataSet.h:71:31: warning: extra ‘;’ [-Wpedantic]
     ODIL_DATASET_ADD(DataSets);
                               ^
                               -
/opt/odil/install/lib/CMake/Odil/../../../include/odil/DataSet.h:72:29: warning: extra ‘;’ [-Wpedantic]
     ODIL_DATASET_ADD(Binary);
                             ^
                             -
In file included from /opt/odil/install/lib/CMake/Odil/../../../include/odil/Reader.h:134,
                 from test.cpp:11:
/opt/odil/install/lib/CMake/Odil/../../../include/odil/Reader.txx: In static member function ‘static T odil::Reader::read_binary(std::istream&, odil::ByteOrdering)’:
/opt/odil/install/lib/CMake/Odil/../../../include/odil/Reader.txx:33:64: warning: declaration of ‘byte_ordering’ shadows a global declaration [-Wshadow]
 ::read_binary(std::istream & stream, ByteOrdering byte_ordering)
                                                                ^
In file included from /opt/odil/install/lib/CMake/Odil/../../../include/odil/Reader.h:19,
                 from test.cpp:11:
/opt/odil/install/lib/CMake/Odil/../../../include/odil/endian.h:35:27: note: shadowed declaration is here
 static ByteOrdering const byte_ordering{get_endianness()};
                           ^~~~~~~~~~~~~