Skip to content

Fix a compilation warning

FU Chengdong requested to merge github/fork/scott-snyder/warn-20230607 into master

Created by: scott-snyder

When compiling iLCUtil v01-07 with gcc 13.1.1, we get a warning

inst/include/ilctest/ILCTest.h: In instantiation of ‘void ILCTest::operator()(const V1&, const V2&, std::string) [with V1 = char [6]; V2 = char [6]; std::string = std::__cxx11::basic_string<char>]’:
iLCUtil/example/hello_world.cc:25:16:   required from here
inst/include/ilctest/ILCTest.h:57:24: warning: comparison between two arrays [-Warray-compare]
   57 |             if ( ! (v1 == v2)  ) {
      |                    ~~~~^~~~~~

Fixed with this change; specialized the comparison for the c-string case.

BEGINRELEASENOTES

  • Fix a compilation warning in ILCTest.h. ENDRELEASENOTES

Merge request reports

Loading