>>> if (sel.empty()) { >>> - const int old_pos = cur.pos(); >>> cur.insert(new InsetMathHull(hullSimple)); >>> BOOST_ASSERT(old_pos == cur.pos()); >>> cur.nextInset()->edit(cur, true);
>> old_pos is not unused as can be seen two lines below the deleted one. > Problem is that MSVC gives a warning for unused variable > when compiling in release mode (with assertion disabled). > CMake now treats these warning as errors. That's the wrong fix. Use const int old_pos = cur.pos(); + (void)old_pos; or const int old_pos = cur.pos(); + // I forget the exact name but it should be discoverable... + boost::unused_variable(old_pos); to trick the compiler. Angus